_listCacheHas.js 403 B

12345678910111213141516
  1. var assocIndexOf = require('./_assocIndexOf');
  2. /**
  3. * Checks if a list cache value for `key` exists.
  4. *
  5. * @private
  6. * @name has
  7. * @memberOf ListCache
  8. * @param {string} key The key of the entry to check.
  9. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  10. */
  11. function listCacheHas(key) {
  12. return assocIndexOf(this.__data__, key) > -1;
  13. }
  14. module.exports = listCacheHas;