libraries/tracking-core/helpers/optOut.js
function setLocalStorage(optOutState) {
  if (!(localStorage && localStorage.setItem)) {
    return null;
  }

  if (typeof optOutState !== 'boolean') {
    console.warn('setCookie for outOut invalid param optOutState. Param must be boolean');
    return null;
  }

  try {
    localStorage.setItem(disableStr, optOutState);
  } catch (e) {
    return null;
  }

  return optOutState;
}
function setLocalStorage(optOutState) {
  if (!(localStorage && localStorage.setItem)) {
    return null;
  }

  if (typeof optOutState !== 'boolean') {
    console.warn('setCookie for outOut invalid param optOutState. Param must be boolean');
    return null;
  }

  try {
    localStorage.setItem(disableStr, optOutState);
  } catch (e) {
    return null;
  }

  return optOutState;
}
function setLocalStorage ( optOutState ) { if ( ! ( localStorage && localStorage . setItem ) ) { return null ; } if ( typeof optOutState !== 'boolean' ) { console . warn ( 'setCookie for outOut invalid param optOutState. Param must be boolean' ) ; return null ; } try { localStorage . setItem ( disableStr , optOutState ) ; } catch ( e ) { return null ; } return optOutState ; }
Sets opt out state to localStorage
@param {boolean} optOutState true - user opted out of tracking, false - user did not opted out
@private
@returns {boolean|null} Info about the success
Sets opt out state to localStorage