Retrieve an item from the store. Unlike the original async_storage library in Gaia, we don't modify return values at all. If a key's value is `undefined`, we pass that value to the callback function.
490772
function getItem$2(key, callback) {
    var self = this;

    key = normalizeKey(key);

    var promise = self.ready().then(function () {
        var dbInfo = self._dbInfo;
        var result = localStorage.getItem(dbInfo.keyPrefix + key);

        // If a result was found, parse it from the serialized
        // string into a JS object. If result isn't truthy, the key
        // is likely undefined and we'll pass it straight to the
        // callback.
        if (result) {
            result = dbInfo.serializer.deserialize(result);
        }

        return result;
    });

    executeCallback(promise, callback);
    return promise;
}
1006312
def get(self, key):
    
    

    try:
      try:
        obj = self.bucket.get(key)
      except couchbase.exception.MemcachedError, inst: 
        if str(inst) == "Memcached error #1:  Not found":
          # for some reason the py cb client raises an error when
          # a key isnt found, instead we just want a none value.
          obj = None
        else:
          raise
      except:
        raise
      
      if obj:
        return json.loads(obj[2])
      else:
        return None

    except:
      raise
168340
def get(self):
        ''''''

        key = self.get_key_from_request()
        result = self.get_storage().get(key)

        return result if result else None
917757
def get(self, item):
        
        resource = super(CloudDatabaseManager, self).get(item)
        resource.volume = CloudDatabaseVolume(resource, resource.volume)
        return resource
525578
function( key /* or array */, callback ) {
            var me = this;
            if ( this.isArray( key ) ) {
                var values = [];
                for ( var i = 0, il = key.length; i < il; i++ ) {
                    me.get( key[i], function( result ) {
                        if ( result ) values.push( result );
                        if ( values.length === il && callback ) {
                            me.lambda( callback ).call( me, values );
                        }
                    });
                }
            } else {
                var error = function(e) { fail( e ); if ( callback ) me.lambda( callback ).call( me ); };
                root( this, function( store ) {
                    store.getFile( key, {create:false}, function( entry ) {
                        entry.file(function( file ) {
                            var reader = new FileReader();

                            reader.onerror = error;

                            reader.onload = function(e) {
                                if ( callback ) me.lambda( callback ).call( me, JSON.parse( e.target.result ) );
                            };

                            reader.readAsText( file );
                        }, error );
                    }, error );
                });
            }
            return this;
        }
971727
def get(self, key):
        
        o = self.data[key]()
        if o is None:
            # On CPython, the weakref callback will always(?) run before any
            # other code has a chance to observe that the weakref is broken;
            # and since the callback removes the item from the dict, this
            # branch of code should never run. However, on PyPy (and possibly
            # other Python implementations), the weakref callback does not run
            # immediately, thus we may be able to observe this intermediate
            # state. Should this occur, we remove the dict item ourselves,
            # and raise CacheFault (which is a KeyError subclass).
            del self.data[key]
            raise CacheFault(
                "FinalizingCache has %r but its value is no more." % (key,))
        log.msg(interface=iaxiom.IStatEvent, stat_cache_hits=1, key=key)
        return o
676865
function (key, value) {
      if (!supported) {
        try {
          $cookieStore.set(key, value);
          return value;
        } catch (e) {
          console.log('Local Storage not supported, make sure you have the $cookieStore supported.');
        }
      }
      var saver = JSON.stringify(value);
      storage.setItem(key, saver);
      return privateMethods.parseValue(saver);
    }
65137
function(key, callback) {
	store.getBytes(key, function(err, value) {
		if (err) { throw 'could not retrieve BYTES for key: '+[key, err].join(' ') }
		callback(value)
	})
}
1029984
function get(obj, key) {
  var type = getGlobalType(obj);
  var func = defaultTypeAdaptorStorage.requireAdaptor(type, 'get');
  return func(obj, key);
}
637066
def get(self, item):
        
        if item in self:  # noqa
            item = getattr(self, item)
            return item()
970353
function getItem(id) {
  return new Promise((resolve, reject) => {
    return instance.pkgs.then(db => {
      const req = db.transaction(db.name)
        .objectStore(db.name).get(id);
      req.onsuccess = event => resolve(event.target.result);
      req.onerror = event => reject(event);
    });
  });
}
1182571
def get(self, key, default=Empty, creator=Empty, expire=None):
        
        try:
            return self.storage.get(key)
        except KeyError as e:
            if creator is not Empty:
                if callable(creator):
                    v = creator()
                else:
                    v = creator
                self.set(key, v, expire)
                return v
            else:
                if default is not Empty:
                    if callable(default):
                        v = default()
                        return v
                    return default
                else:
                    raise
15469
function getAsset(key) {
  return new Promise((resolve, reject) => {
    return instance.assets.then(db => {
      const req = db.transaction(db.name)
        .objectStore(db.name).get(key);
      req.onsuccess = event => {
        const undef = event.target.result === undefined;
        const value = undef ? undefined : event.target.result.value;
        resolve(value);
      };
      req.onerror = event => reject(event);
    });
  });
}
227594
def get(self, key):
    ''''''
    value = None
    for store in self._stores:
      value = store.get(key)
      if value is not None:
        break

    # add model to lower stores only
    if value is not None:
      for store2 in self._stores:
        if store == store2:
          break
        store2.put(key, value)

    return value
39556
function setItem(key, value, callback) {
	        var self = this;

	        // Cast the key to a string, as that's all we can set as a key.
	        if (typeof key !== 'string') {
	            globalObject.console.warn(key + ' used as a key, but it is not a string.');
	            key = String(key);
	        }

	        var promise = self.ready().then(function () {
	            // Convert undefined values to null.
	            // https://github.com/mozilla/localForage/pull/42
	            if (value === undefined) {
	                value = null;
	            }

	            // Save the original value to pass to the callback.
	            var originalValue = value;

	            return new Promise(function (resolve, reject) {
	                var dbInfo = self._dbInfo;
	                dbInfo.serializer.serialize(value, function (value, error) {
	                    if (error) {
	                        reject(error);
	                    } else {
	                        try {
	                            localStorage.setItem(dbInfo.keyPrefix + key, value);
	                            resolve(originalValue);
	                        } catch (e) {
	                            // localStorage capacity exceeded.
	                            // TODO: Make this a specific error/event.
	                            if (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {
	                                reject(e);
	                            }
	                            reject(e);
	                        }
	                    }
	                });
	            });
	        });

	        executeCallback(promise, callback);
	        return promise;
	    }
299330
def get_item(id, query = {} )
      response = self.get('items', id, query).body
      return OmekaClient::OmekaItem.new(self, JSON.parse(response))
    end
599354
function(key) {

            // get value and time left
            var ret = {
                value: this._storage.getItem(key),
                timeLeft: this.getTimeLeft(key),
            };

            // set if expired
            ret.isExpired = ret.timeLeft !== null && ret.timeLeft <= 0;

            // return data
            return ret;
        }