Last change
on this file since 6fe77af was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
734 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var ListCache = require('./_ListCache'),
|
---|
| 2 | stackClear = require('./_stackClear'),
|
---|
| 3 | stackDelete = require('./_stackDelete'),
|
---|
| 4 | stackGet = require('./_stackGet'),
|
---|
| 5 | stackHas = require('./_stackHas'),
|
---|
| 6 | stackSet = require('./_stackSet');
|
---|
| 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 | module.exports = Stack;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.