function _getStorageType( storage ) {
    // Use default setting if none is provided.
    if ( typeof storage !== 'object' ) {
      if ( typeof _storage === 'undefined' ) {
        try {
          storage = window.sessionStorage;
        } catch( err ) {
          // SecurityError was thrown if cookies are off.
          storage = {};
        }
      } else {
        storage = _storage;
      }
    }

    return storage;
  }
/**
   * Internal function for whether to use local or session storage.
   * @param {Object} storage
   *   Use non-persistent storage (sessionStorage)
   *   or persistent storage (localStorage).
   * @returns {Object} A local storage or session storage instance.
   */
Internal function for whether to use local or session storage.
@param {Object} storage
Use non-persistent storage (sessionStorage)
or persistent storage (localStorage).
@returns {Object} A local storage or session storage instance.
Internal function for whether to use local or session storage . @param { Object } storage Use non - persistent storage ( sessionStorage ) or persistent storage ( localStorage ) . @returns { Object } A local storage or session storage instance .
function _getStorageType( storage ) {
    if ( typeof storage !== 'object' ) {
      if ( typeof _storage === 'undefined' ) {
        try {
          storage = window.sessionStorage;
        } catch( err ) {
          storage = {};
        }
      } else {
        storage = _storage;
      }
    }
    return storage;
  }
function _getStorageType ( storage ) { if ( typeof storage !== 'object' ) { if ( typeof _storage === 'undefined' ) { try { storage = window . sessionStorage ; } catch ( err ) { storage = { } ; } } else { storage = _storage ; } } return storage ; }
Internal function for whether to use local or session storage.
Internal function for whether to use local or session storage .
// Use default setting if none is provided. // SecurityError was thrown if cookies are off.