deno.land / x / lodash@4.17.19 / npm-package / _ListCache.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
var listCacheClear = require('./_listCacheClear'), listCacheDelete = require('./_listCacheDelete'), listCacheGet = require('./_listCacheGet'), listCacheHas = require('./_listCacheHas'), listCacheSet = require('./_listCacheSet');
/** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length;
this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); }}
// Add methods to `ListCache`.ListCache.prototype.clear = listCacheClear;ListCache.prototype['delete'] = listCacheDelete;ListCache.prototype.get = listCacheGet;ListCache.prototype.has = listCacheHas;ListCache.prototype.set = listCacheSet;
module.exports = ListCache;
lodash

Version Info

Tagged at
3 years ago

External Dependencies

No external dependencies 🎉