mirror of
https://github.com/nodejs/node.git
synced 2025-08-17 22:58:52 +02:00

PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss <me@silverwind.io>
14 lines
370 B
JavaScript
14 lines
370 B
JavaScript
/**
|
|
* 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;
|