code: function ExpiredStorage(storage) {
  
          // set default storage to localStorage
          storage = storage || (typeof localStorage !== "undefined" ? localStorage : null);
  
          // sanity check1: make sure we have a valid storage class to use.
          if (!storage) {
              throw new Error("ExpiredStorage: No storage base class provided and 'localStorage' is undefined! Please provide a valid base storage class.");
          }
  
          // sanity check2: make sure the storage class provide the required API.
          if (!(storage.setItem && storage.getItem && storage.removeItem && storage.clear)) {
              throw new Error("ExpiredStorage: Storage class  don't support one or more of the required API functions: getItem, setItem, removeItem or clear.");
          }
  
          // set storage class
          this._storage = storage;
      }
docs: ExpiredStorage
  A class to manage local storage with expiration time (like cookies).
  
  @param storage: Optional storage base class to use (must implement the 'localStorage' API). If not defined, 'localStorage' will be used as a default.