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
418 B

1 month ago
  1. import assocIndexOf from './_assocIndexOf.js';
  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. export default listCacheGet;