ionic-core.js
function(key) {

          // First check to see if it's the object cache
          var cached = objectCache[key];
          if (cached) {
            return cached;
          }

          // Deserialize the object from JSON
          var json = persistenceStrategy.get(key);

          // null or undefined --> return null.
          if (json == null) {
            return null;
          }

          try {
            return JSON.parse(json);
          } catch (err) {
            return null;
          }
        }
function(key) {

          // First check to see if it's the object cache
          var cached = objectCache[key];
          if (cached) {
            return cached;
          }

          // Deserialize the object from JSON
          var json = persistenceStrategy.get(key);

          // null or undefined --> return null.
          if (json == null) {
            return null;
          }

          try {
            return JSON.parse(json);
          } catch (err) {
            return null;
          }
        }
function ( key ) { // First check to see if it's the object cache var cached = objectCache [ key ] ; if ( cached ) { return cached ; } // Deserialize the object from JSON var json = persistenceStrategy . get ( key ) ; // null or undefined --> return null. if ( json == null ) { return null ; } try { return JSON . parse ( json ) ; } catch ( err ) { return null ; } }
Either retrieves the cached copy of an object,
or the object itself from localStorage.
Returns null if the object couldn't be found.
Either retrieves the cached copy of an object or the object itself from localStorage . Returns null if the object couldn t be found .