static isStorageAvailable() {
      try {
        const test = "__test__";
        localStorage.setItem(test, test);
        localStorage.removeItem(test);
        return true;
      } catch (e2) {
        return false;
      }
    }
Saves the current state to localStorage.
@returns {{data: any, timestamp: number}|null}