summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/lodash/internal/mapDelete.js
blob: 8b7fd53531199b9ef07c4696768075417ef74fdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/**
 * Removes `key` and its value from the cache.
 *
 * @private
 * @name delete
 * @memberOf _.memoize.Cache
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`.
 */
function mapDelete(key) {
  return this.has(key) && delete this.__data__[key];
}

module.exports = mapDelete;