UNPKG

@webqit/util

Version:

Utility functions used accross multiple JS libraries.

13 lines (11 loc) 240 B
/** * Tells if ALL items pass the test. * * @param array arr * @param function callback * * @return bool */ export default function(arr, callback) { return arr.reduce((prevTest, itm, i) => prevTest && callback(itm, i), true); };