mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
488 B
19 lines
488 B
9 years ago
|
var nativeCreate = require('./_nativeCreate');
|
||
|
|
||
|
/** Used to stand-in for `undefined` hash values. */
|
||
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
||
|
|
||
|
/**
|
||
|
* Sets the hash `key` to `value`.
|
||
|
*
|
||
|
* @private
|
||
|
* @param {Object} hash The hash to modify.
|
||
|
* @param {string} key The key of the value to set.
|
||
|
* @param {*} value The value to set.
|
||
|
*/
|
||
|
function hashSet(hash, key, value) {
|
||
|
hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
||
|
}
|
||
|
|
||
|
module.exports = hashSet;
|