js/deviceData.js
function _setVadrDeviceCookie(){

    // setting cookie valid for years set in constants
    const cookieValidFor = constants.cookieValidForYears;
    const deviceCookieName = constants.deviceCookieName;

    const currentDate = new Date();
    const laterDate = new Date();
    laterDate.setFullYear(currentDate.getFullYear() + cookieValidFor);

    const deviceId = utils.getToken();

    utils.setCookie(deviceCookieName, deviceId, laterDate, false);
    
    return deviceId;

}
function _setVadrDeviceCookie(){

    // setting cookie valid for years set in constants
    const cookieValidFor = constants.cookieValidForYears;
    const deviceCookieName = constants.deviceCookieName;

    const currentDate = new Date();
    const laterDate = new Date();
    laterDate.setFullYear(currentDate.getFullYear() + cookieValidFor);

    const deviceId = utils.getToken();

    utils.setCookie(deviceCookieName, deviceId, laterDate, false);
    
    return deviceId;

}
function _setVadrDeviceCookie ( ) { // setting cookie valid for years set in constants const cookieValidFor = constants . cookieValidForYears ; const deviceCookieName = constants . deviceCookieName ; const currentDate = new Date ( ) ; const laterDate = new Date ( ) ; laterDate . setFullYear ( currentDate . getFullYear ( ) + cookieValidFor ) ; const deviceId = utils . getToken ( ) ; utils . setCookie ( deviceCookieName , deviceId , laterDate , false ) ; return deviceId ; }
sets the deviceId to Cookie
sets the deviceId to Cookie