X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=node_modules%2Fgrunt-legacy-log-utils%2Fnode_modules%2Flodash%2F_cacheHas.js;fp=node_modules%2Fgrunt-legacy-log-utils%2Fnode_modules%2Flodash%2F_cacheHas.js;h=7f2ac484760bfdef2a928e1b4b5f82dba7e9bfed;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/node_modules/grunt-legacy-log-utils/node_modules/lodash/_cacheHas.js b/node_modules/grunt-legacy-log-utils/node_modules/lodash/_cacheHas.js new file mode 100644 index 000000000..7f2ac4847 --- /dev/null +++ b/node_modules/grunt-legacy-log-utils/node_modules/lodash/_cacheHas.js @@ -0,0 +1,25 @@ +var isKeyable = require('./_isKeyable'); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Checks if `value` is in `cache`. + * + * @private + * @param {Object} cache The set cache to search. + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function cacheHas(cache, value) { + var map = cache.__data__; + if (isKeyable(value)) { + var data = map.__data__, + hash = typeof value == 'string' ? data.string : data.hash; + + return hash[value] === HASH_UNDEFINED; + } + return map.has(value); +} + +module.exports = cacheHas;