Sha256: 8b9d2ef7de7e836d7599545dff6c69ebff6f0b8033fdcc4bf18fabaca9b52fe3
Contents?: true
Size: 650 Bytes
Versions: 153
Compression:
Stored size: 650 Bytes
Contents
var SetCache = require('./SetCache'), getNative = require('./getNative'); /** Native method references. */ var Set = getNative(global, 'Set'); /* Native method references for those with the same name as other `lodash` methods. */ var nativeCreate = getNative(Object, 'create'); /** * Creates a `Set` cache object to optimize linear searches of large arrays. * * @private * @param {Array} [values] The values to cache. * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. */ function createCache(values) { return (nativeCreate && Set) ? new SetCache(values) : null; } module.exports = createCache;
Version data entries
153 entries across 80 versions & 8 rubygems