lib/sugar.js
/*
  This function allows you to test whether every value in an object matches 
  a certain criteria. For example, is every value greater than 100? 
  The function receives an object and a tester function. 
  If all values in the object pass the tester function, true is returned. 
  Otherwise, return false.
*/
This function allows you to test whether every value in an object matches
a certain criteria. For example, is every value greater than 100.
The function receives an object and a tester function.
If all values in the object pass the tester function, true is returned.
Otherwise, return false.
This function allows you to test whether every value in an object matches a certain criteria . For example is every value greater than 100 . The function receives an object and a tester function . If all values in the object pass the tester function true is returned . Otherwise return false .
function every(obj, func) {
  const values = Object.values(obj);
  let match = true;
  for(let el of values) {
    func(el) ? null : match = false;
  }
  return match;
}
function every ( obj , func ) { const values = Object . values ( obj ) ; let match = true ; for ( let el of values ) { func ( el ) ? null : match = false ; } return match ; }
This function allows you to test whether every value in an object matches
a certain criteria.
This function allows you to test whether every value in an object matches a certain criteria .