mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
react app
This commit is contained in:
29
react-app/node_modules/lodash/internal/SetCache.js
generated
vendored
Normal file
29
react-app/node_modules/lodash/internal/SetCache.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
var cachePush = require('./cachePush'),
|
||||
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 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;
|
Reference in New Issue
Block a user