Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website] / node_modules / grunt-legacy-util / node_modules / lodash / _Stack.js
1 var stackClear = require('./_stackClear'),
2     stackDelete = require('./_stackDelete'),
3     stackGet = require('./_stackGet'),
4     stackHas = require('./_stackHas'),
5     stackSet = require('./_stackSet');
6
7 /**
8  * Creates a stack cache object to store key-value pairs.
9  *
10  * @private
11  * @param {Array} [values] The values to cache.
12  */
13 function Stack(values) {
14   var index = -1,
15       length = values ? values.length : 0;
16
17   this.clear();
18   while (++index < length) {
19     var entry = values[index];
20     this.set(entry[0], entry[1]);
21   }
22 }
23
24 // Add functions to the `Stack` cache.
25 Stack.prototype.clear = stackClear;
26 Stack.prototype['delete'] = stackDelete;
27 Stack.prototype.get = stackGet;
28 Stack.prototype.has = stackHas;
29 Stack.prototype.set = stackSet;
30
31 module.exports = Stack;