mapHas.js 547 B

1234567891011121314151617181920
  1. /** Used for native method references. */
  2. var objectProto = Object.prototype;
  3. /** Used to check objects for own properties. */
  4. var hasOwnProperty = objectProto.hasOwnProperty;
  5. /**
  6. * Checks if a cached value for `key` exists.
  7. *
  8. * @private
  9. * @name has
  10. * @memberOf _.memoize.Cache
  11. * @param {string} key The key of the entry to check.
  12. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  13. */
  14. function mapHas(key) {
  15. return key != '__proto__' && hasOwnProperty.call(this.__data__, key);
  16. }
  17. module.exports = mapHas;