Sha256: 58e748ebf0aefcec5431a1907106465be05f4f6be81413bebe63892b39052e31
Contents?: true
Size: 755 Bytes
Versions: 14
Compression:
Stored size: 755 Bytes
Contents
var SetCache = require('./SetCache'), constant = require('../utility/constant'), isNative = require('../lang/isNative'); /** Native method references. */ var Set = isNative(Set = global.Set) && Set; /* Native method references for those with the same name as other `lodash` methods. */ var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate; /** * 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`. */ var createCache = !(nativeCreate && Set) ? constant(null) : function(values) { return new SetCache(values); }; module.exports = createCache;
Version data entries
14 entries across 7 versions & 1 rubygems