lib/util.js
function findWhere(arr, key, value) {

  return arr.find(elem => {

    for (const [k, v] of getIterableObjectEntries(elem)) {

      if (k === key && v === value) {
        return true;
      }
    }
  });
}
function findWhere(arr, key, value) {

  return arr.find(elem => {

    for (const [k, v] of getIterableObjectEntries(elem)) {

      if (k === key && v === value) {
        return true;
      }
    }
  });
}
function findWhere ( arr , key , value ) { return arr . find ( elem => { for ( const [ k , v ] of getIterableObjectEntries ( elem ) ) { if ( k === key && v === value ) { return true ; } } } ) ; }
Returns the object where the given own key exists and equal with value
@param {Array.<Object>} arr The source array of objects
@param {string} key The name of the own key to filter with
@param {*} value The value of the key to filter with
@returns {Object} The found object specified by the key value pair
Returns the object where the given own key exists and equal with value