mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
more work
This commit is contained in:
22
node_modules/lodash/internal/createCache.js
generated
vendored
Normal file
22
node_modules/lodash/internal/createCache.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
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;
|
Reference in New Issue
Block a user