2016-05-07 11:49:46 -07:00
|
|
|
define([], function() {
|
2015-12-16 17:53:20 -08:00
|
|
|
|
|
|
|
|
/**
|
2016-09-17 22:24:52 -07:00
|
|
|
* Checks if a `cache` value for `key` exists.
|
2015-12-16 17:53:20 -08:00
|
|
|
*
|
|
|
|
|
* @private
|
2016-05-07 11:49:46 -07:00
|
|
|
* @param {Object} cache The cache to query.
|
|
|
|
|
* @param {string} key The key of the entry to check.
|
|
|
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
2015-12-16 17:53:20 -08:00
|
|
|
*/
|
2016-05-07 11:49:46 -07:00
|
|
|
function cacheHas(cache, key) {
|
|
|
|
|
return cache.has(key);
|
2015-12-16 17:53:20 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return cacheHas;
|
|
|
|
|
});
|