mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Bump to v4.12.0.
This commit is contained in:
10
_hashSet.js
10
_hashSet.js
@@ -7,12 +7,16 @@ var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
||||
* Sets the hash `key` to `value`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} hash The hash to modify.
|
||||
* @name set
|
||||
* @memberOf Hash
|
||||
* @param {string} key The key of the value to set.
|
||||
* @param {*} value The value to set.
|
||||
* @returns {Object} Returns the hash instance.
|
||||
*/
|
||||
function hashSet(hash, key, value) {
|
||||
hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
||||
function hashSet(key, value) {
|
||||
var data = this.__data__;
|
||||
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
||||
return this;
|
||||
}
|
||||
|
||||
module.exports = hashSet;
|
||||
|
||||
Reference in New Issue
Block a user