UNPKG

@nicholasmole/find-object-in-array

Version:

Find an Object in an array of Objects using property and key

11 lines 231 B
'use strict'; /** * Adds commas to a number * @param {array} obj * @param {string} key * @param {string} keyValue * @return {object} */ module.exports = function finder(obj, key, keyValue) { return obj[key] === keyValue; };