modules/pubCommonId.js
function writeValue(name, value, expInterval) {
  if (name && value) {
    if (pubcidConfig.typeEnabled === COOKIE) {
      setCookie(name, value, expInterval);
    } else if (pubcidConfig.typeEnabled === LOCAL_STORAGE) {
      setStorageItem(name, value, expInterval);
    }
  }
}
function writeValue(name, value, expInterval) {
  if (name && value) {
    if (pubcidConfig.typeEnabled === COOKIE) {
      setCookie(name, value, expInterval);
    } else if (pubcidConfig.typeEnabled === LOCAL_STORAGE) {
      setStorageItem(name, value, expInterval);
    }
  }
}
function writeValue ( name , value , expInterval ) { if ( name && value ) { if ( pubcidConfig . typeEnabled === COOKIE ) { setCookie ( name , value , expInterval ) ; } else if ( pubcidConfig . typeEnabled === LOCAL_STORAGE ) { setStorageItem ( name , value , expInterval ) ; } } }
Write a value to either cookies or local storage
@param {string} name Name of the item
@param {string} value Value to be stored
@param {number} expInterval Expiry time in minutes
Write a value to either cookies or local storage