diff options
Diffstat (limited to 'deps/npm/node_modules/lodash.without/node_modules/lodash._setcache/index.js')
-rw-r--r-- | deps/npm/node_modules/lodash.without/node_modules/lodash._setcache/index.js | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/deps/npm/node_modules/lodash.without/node_modules/lodash._setcache/index.js b/deps/npm/node_modules/lodash.without/node_modules/lodash._setcache/index.js deleted file mode 100644 index 45a19c662d..0000000000 --- a/deps/npm/node_modules/lodash.without/node_modules/lodash._setcache/index.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * lodash 4.0.0 (Custom Build) <https://lodash.com/> - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <https://lodash.com/license> - */ -var MapCache = require('lodash._mapcache'); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * - * Creates a set cache object to store unique values. - * - * @private - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values ? values.length : 0; - - this.__data__ = new MapCache; - while (++index < length) { - this.push(values[index]); - } -} - -/** - * 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); - } -} - -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return type == 'number' || type == 'boolean' || - (type == 'string' && value !== '__proto__') || value == null; -} - -// Add functions to the `SetCache`. -SetCache.prototype.push = cachePush; - -module.exports = SetCache; |