Files
lodash/_hashDelete.js
John-David Dalton 7293d39642 Bump to v4.1.0.
2016-01-29 01:14:13 -08:00

17 lines
421 B
JavaScript

define(['./_hashHas'], function(hashHas) {
/**
* Removes `key` and its value from the hash.
*
* @private
* @param {Object} hash The hash to modify.
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(hash, key) {
return hashHas(hash, key) && delete hash[key];
}
return hashDelete;
});