1 | import mapClear from './_mapClear';
|
2 | import mapDelete from './_mapDelete';
|
3 | import mapGet from './_mapGet';
|
4 | import mapHas from './_mapHas';
|
5 | import mapSet from './_mapSet';
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | function MapCache(values) {
|
15 | var index = -1,
|
16 | length = values ? values.length : 0;
|
17 |
|
18 | this.clear();
|
19 | while (++index < length) {
|
20 | var entry = values[index];
|
21 | this.set(entry[0], entry[1]);
|
22 | }
|
23 | }
|
24 |
|
25 |
|
26 | MapCache.prototype.clear = mapClear;
|
27 | MapCache.prototype['delete'] = mapDelete;
|
28 | MapCache.prototype.get = mapGet;
|
29 | MapCache.prototype.has = mapHas;
|
30 | MapCache.prototype.set = mapSet;
|
31 |
|
32 | export default MapCache;
|