source: imaps-frontend/node_modules/lodash-es/_ListCache.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 867 bytes
Line 
1import listCacheClear from './_listCacheClear.js';
2import listCacheDelete from './_listCacheDelete.js';
3import listCacheGet from './_listCacheGet.js';
4import listCacheHas from './_listCacheHas.js';
5import listCacheSet from './_listCacheSet.js';
6
7/**
8 * Creates an list cache object.
9 *
10 * @private
11 * @constructor
12 * @param {Array} [entries] The key-value pairs to cache.
13 */
14function ListCache(entries) {
15 var index = -1,
16 length = entries == null ? 0 : entries.length;
17
18 this.clear();
19 while (++index < length) {
20 var entry = entries[index];
21 this.set(entry[0], entry[1]);
22 }
23}
24
25// Add methods to `ListCache`.
26ListCache.prototype.clear = listCacheClear;
27ListCache.prototype['delete'] = listCacheDelete;
28ListCache.prototype.get = listCacheGet;
29ListCache.prototype.has = listCacheHas;
30ListCache.prototype.set = listCacheSet;
31
32export default ListCache;
Note: See TracBrowser for help on using the repository browser.