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 / _MapCache.js
1 var mapClear = require('./_mapClear'),
2     mapDelete = require('./_mapDelete'),
3     mapGet = require('./_mapGet'),
4     mapHas = require('./_mapHas'),
5     mapSet = require('./_mapSet');
6
7 /**
8  * Creates a map cache object to store key-value pairs.
9  *
10  * @private
11  * @param {Array} [values] The values to cache.
12  */
13 function MapCache(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 `MapCache`.
25 MapCache.prototype.clear = mapClear;
26 MapCache.prototype['delete'] = mapDelete;
27 MapCache.prototype.get = mapGet;
28 MapCache.prototype.has = mapHas;
29 MapCache.prototype.set = mapSet;
30
31 module.exports = MapCache;