Security update for permissions_by_term
[yaffs-website] / node_modules / uncss / node_modules / lodash / internal / mapHas.js
1 var Map = require('./Map'),
2     assocHas = require('./assocHas'),
3     hashHas = require('./hashHas'),
4     isKeyable = require('./isKeyable');
5
6 /**
7  * Checks if a map value for `key` exists.
8  *
9  * @private
10  * @name has
11  * @memberOf MapCache
12  * @param {string} key The key of the entry to check.
13  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
14  */
15 function mapHas(key) {
16   var data = this.__data__;
17   if (isKeyable(key)) {
18     return hashHas(typeof key == 'string' ? data.string : data.hash, key);
19   }
20   return Map ? data.map.has(key) : assocHas(data.map, key);
21 }
22
23 module.exports = mapHas;