blob: 2dec892689260577dad93993d057c1cb299a523b [file] [log] [blame]
Leo Repp58b9f112021-11-22 11:57:47 +01001/**
2 * Checks if a `cache` value for `key` exists.
3 *
4 * @private
5 * @param {Object} cache The cache to query.
6 * @param {string} key The key of the entry to check.
7 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
8 */
9function cacheHas(cache, key) {
10 return cache.has(key);
11}
12
13module.exports = cacheHas;