mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Bump to v4.1.0.
This commit is contained in:
15
_assocHas.js
Normal file
15
_assocHas.js
Normal file
@@ -0,0 +1,15 @@
|
||||
var assocIndexOf = require('./_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;
|
||||
}
|
||||
|
||||
module.exports = assocHas;
|
||||
Reference in New Issue
Block a user