You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
420 B

4 years ago
  1. var assocIndexOf = require('./_assocIndexOf');
  2. /**
  3. * Gets the list cache value for `key`.
  4. *
  5. * @private
  6. * @name get
  7. * @memberOf ListCache
  8. * @param {string} key The key of the value to get.
  9. * @returns {*} Returns the entry value.
  10. */
  11. function listCacheGet(key) {
  12. var data = this.__data__,
  13. index = assocIndexOf(data, key);
  14. return index < 0 ? undefined : data[index][1];
  15. }
  16. module.exports = listCacheGet;