isStorageDisabled(testStorage) {
    const testValue = '__VASTStorage__';

    try {
      testStorage.setItem(testValue, testValue);
      if (testStorage.getItem(testValue) !== testValue) {
        testStorage.removeItem(testValue);
        return true;
      }
    } catch (e) {
      return true;
    }

    testStorage.removeItem(testValue);
    return false;
  }
/**
   * Check if storage is disabled (like in certain cases with private browsing).
   * In Safari (Mac + iOS) when private browsing is ON, localStorage is read only
   * http://spin.atomicobject.com/2013/01/23/ios-private-browsing-localstorage/
   * @param {Object} testStorage - The storage to check.
   * @return {Boolean}
   */
Check if storage is disabled (like in certain cases with private browsing).
Check if storage is disabled ( like in certain cases with private browsing ) .
isStorageDisabled(testStorage) {
    const testValue = '__VASTStorage__';
    try {
      testStorage.setItem(testValue, testValue);
      if (testStorage.getItem(testValue) !== testValue) {
        testStorage.removeItem(testValue);
        return true;
      }
    } catch (e) {
      return true;
    }
    testStorage.removeItem(testValue);
    return false;
  }
isStorageDisabled ( testStorage ) { const testValue = '__VASTStorage__' ; try { testStorage . setItem ( testValue , testValue ) ; if ( testStorage . getItem ( testValue ) !== testValue ) { testStorage . removeItem ( testValue ) ; return true ; } } catch ( e ) { return true ; } testStorage . removeItem ( testValue ) ; return false ; }
Check if storage is disabled (like in certain cases with private browsing).
Check if storage is disabled ( like in certain cases with private browsing ) .