mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Bump to v4.1.0.
This commit is contained in:
16
_assocGet.js
Normal file
16
_assocGet.js
Normal file
@@ -0,0 +1,16 @@
|
||||
var assocIndexOf = require('./_assocIndexOf');
|
||||
|
||||
/**
|
||||
* Gets the associative array value for `key`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to query.
|
||||
* @param {string} key The key of the value to get.
|
||||
* @returns {*} Returns the entry value.
|
||||
*/
|
||||
function assocGet(array, key) {
|
||||
var index = assocIndexOf(array, key);
|
||||
return index < 0 ? undefined : array[index][1];
|
||||
}
|
||||
|
||||
module.exports = assocGet;
|
||||
Reference in New Issue
Block a user