'use strict';

var _ListCache = require('./_ListCache.js');
var _stackClear = require('./_stackClear.js');
var _stackDelete = require('./_stackDelete.js');
var _stackGet = require('./_stackGet.js');
var _stackHas = require('./_stackHas.js');
var _stackSet = require('./_stackSet.js');

/**
 * Creates a stack cache object to store key-value pairs.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function Stack(entries) {
  var data = this.__data__ = new _ListCache(entries);
  this.size = data.size;
}

// Add methods to `Stack`.
Stack.prototype.clear = _stackClear;
Stack.prototype['delete'] = _stackDelete;
Stack.prototype.get = _stackGet;
Stack.prototype.has = _stackHas;
Stack.prototype.set = _stackSet;

module.exports = Stack;
