mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Bump to v4.12.0.
This commit is contained in:
10
_hashSet.js
10
_hashSet.js
@@ -10,12 +10,16 @@ define(['./_nativeCreate'], function(nativeCreate) {
|
||||
* 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;
|
||||
}
|
||||
|
||||
return hashSet;
|
||||
|
||||
Reference in New Issue
Block a user