function getLocalStorageItem(key) {
  try {
    return JSON.parse(
      window.localStorage.getItem(key)
    );
  } catch (e) {
    return null;
  }
}
function getLocalStorageItem(key) {
  try {
    return JSON.parse(
      window.localStorage.getItem(key)
    );
  } catch (e) {
    return null;
  }
}
function getLocalStorageItem ( key ) { try { return JSON . parse ( window . localStorage . getItem ( key ) ) ; } catch ( e ) { return null ; } }
Get a JSON serialized value from localStorage. (Return the deserialized version.)

@param  {String} key Key in localStorage
@return {*}      The deserialized value
Get a JSON serialized value from localStorage . ( Return the deserialized version . )