Urara-Blog/node_modules/.pnpm-store/v3/files/97/d06b41d8449be3445f64d93afbb281a267a199aa1700f60bea98764332ddfe76a51db6a715941966b234918e2abdf434567e7b48772e4f269ea5d0e8fffbcf
2022-08-14 01:14:53 +08:00

18 lines
450 B
Text

var getMapData = require('./_getMapData');
/**
* Removes `key` and its value from the map.
*
* @private
* @name delete
* @memberOf MapCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapCacheDelete(key) {
var result = getMapData(this, key)['delete'](key);
this.size -= result ? 1 : 0;
return result;
}
module.exports = mapCacheDelete;