code: function getLocalStorageItem(key) {
    try {
      return JSON.parse(
        window.localStorage.getItem(key)
      );
    } catch (e) {
      return null;
    }
  }
docs: Get a JSON serialized value from localStorage. (Return the deserialized version.)
  
  @param  {String} key Key in localStorage
  @return {*}      The deserialized value