e095202070bf3a3081f7774a7e497fbbc91d3d76
[yaffs-website] / stackGet.js
1 var assocGet = require('./assocGet');
2
3 /**
4  * Gets the stack value for `key`.
5  *
6  * @private
7  * @name get
8  * @memberOf Stack
9  * @param {string} key The key of the value to get.
10  * @returns {*} Returns the entry value.
11  */
12 function stackGet(key) {
13   var data = this.__data__,
14       array = data.array;
15
16   return array ? assocGet(array, key) : data.map.get(key);
17 }
18
19 module.exports = stackGet;