Projekt

Obecné

Profil

Stáhnout (734 Bajtů) Statistiky
| Větev: | Revize:
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;
(13-13/634)