mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 07:17:50 +00:00
17 lines
434 B
JavaScript
17 lines
434 B
JavaScript
define(['./_assocIndexOf'], function(assocIndexOf) {
|
|
|
|
/**
|
|
* Checks if an associative array value for `key` exists.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to query.
|
|
* @param {string} key The key of the entry to check.
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
*/
|
|
function assocHas(array, key) {
|
|
return assocIndexOf(array, key) > -1;
|
|
}
|
|
|
|
return assocHas;
|
|
});
|