X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fgrunt-legacy-util%2Fnode_modules%2Flodash%2F_cachePush.js;fp=node_modules%2Fgrunt-legacy-util%2Fnode_modules%2Flodash%2F_cachePush.js;h=638383b641efcbbd413d8ca83d90bfcd2b88543a;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/grunt-legacy-util/node_modules/lodash/_cachePush.js b/node_modules/grunt-legacy-util/node_modules/lodash/_cachePush.js new file mode 100644 index 000000000..638383b64 --- /dev/null +++ b/node_modules/grunt-legacy-util/node_modules/lodash/_cachePush.js @@ -0,0 +1,27 @@ +var isKeyable = require('./_isKeyable'); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the set cache. + * + * @private + * @name push + * @memberOf SetCache + * @param {*} value The value to cache. + */ +function cachePush(value) { + var map = this.__data__; + if (isKeyable(value)) { + var data = map.__data__, + hash = typeof value == 'string' ? data.string : data.hash; + + hash[value] = HASH_UNDEFINED; + } + else { + map.set(value, HASH_UNDEFINED); + } +} + +module.exports = cachePush;