Files
lodash/_listCacheGet.js
John-David Dalton 6f47eae67b Bump to v4.12.0.
2016-05-08 12:21:54 -07:00

24 lines
543 B
JavaScript

define(['./_assocIndexOf'], function(assocIndexOf) {
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
var undefined;
/**
* Gets the list cache value for `key`.
*
* @private
* @name get
* @memberOf ListCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function listCacheGet(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
return index < 0 ? undefined : data[index][1];
}
return listCacheGet;
});