UNPKG

motion

Version:

motion - moving development forward

17 lines (14 loc) 406 B
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;