/**
 * @flow
 */
const LOCAL_STORAGE = window.localStorage;
const JSON = window.JSON;

const storageUtils = {
  localStorageGet: function (key: string): any {
    return JSON.parse(LOCAL_STORAGE.getItem(key));
  },

  localStorageSet: function (key: string, value: any): void {
    LOCAL_STORAGE.setItem(key, JSON.stringify(value));
  }
};


export default storageUtils;
