Sha256: afba6d4d432544c8c5370205b65677fd0264a5213c61671d0e858628d3e41d0a
Contents?: true
Size: 746 Bytes
Versions: 14
Compression:
Stored size: 746 Bytes
Contents
var cachePush = require('./cachePush'), 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 cache object to store unique values. * * @private * @param {Array} [values] The values to cache. */ function SetCache(values) { var length = values ? values.length : 0; this.data = { 'hash': nativeCreate(null), 'set': new Set }; while (length--) { this.push(values[length]); } } // Add functions to the `Set` cache. SetCache.prototype.push = cachePush; module.exports = SetCache;
Version data entries
14 entries across 7 versions & 1 rubygems