Files
lodash/_assocHas.js
John-David Dalton 466c67a8b6 Bump to v4.1.0.
2016-01-29 01:20:57 -08:00

16 lines
405 B
JavaScript

import assocIndexOf from './_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;
}
export default assocHas;