mapDelete.js 370 B

1234567891011121314
  1. /**
  2. * Removes `key` and its value from the cache.
  3. *
  4. * @private
  5. * @name delete
  6. * @memberOf _.memoize.Cache
  7. * @param {string} key The key of the value to remove.
  8. * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`.
  9. */
  10. function mapDelete(key) {
  11. return this.has(key) && delete this.__data__[key];
  12. }
  13. module.exports = mapDelete;