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

23 lines
609 B
JavaScript

define(['./_nativeCreate'], function(nativeCreate) {
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
var undefined;
/** 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;
}
return hashSet;
});