main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
732 bytes
|
Line | |
---|
1 | import ListCache from './_ListCache.js';
|
---|
2 | import stackClear from './_stackClear.js';
|
---|
3 | import stackDelete from './_stackDelete.js';
|
---|
4 | import stackGet from './_stackGet.js';
|
---|
5 | import stackHas from './_stackHas.js';
|
---|
6 | import stackSet from './_stackSet.js';
|
---|
7 |
|
---|
8 | /**
|
---|
9 | * Creates a stack cache object to store key-value pairs.
|
---|
10 | *
|
---|
11 | * @private
|
---|
12 | * @constructor
|
---|
13 | * @param {Array} [entries] The key-value pairs to cache.
|
---|
14 | */
|
---|
15 | function Stack(entries) {
|
---|
16 | var data = this.__data__ = new ListCache(entries);
|
---|
17 | this.size = data.size;
|
---|
18 | }
|
---|
19 |
|
---|
20 | // Add methods to `Stack`.
|
---|
21 | Stack.prototype.clear = stackClear;
|
---|
22 | Stack.prototype['delete'] = stackDelete;
|
---|
23 | Stack.prototype.get = stackGet;
|
---|
24 | Stack.prototype.has = stackHas;
|
---|
25 | Stack.prototype.set = stackSet;
|
---|
26 |
|
---|
27 | export default Stack;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.