UNPKG

bbo

Version:

bbo is a utility library of zero dependencies for javascript.

10 lines (8 loc) 292 B
/** * Returns true if the provided predicate function returns true for at least one element in a collection,false otherwise. */ var any = function (arr) { var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Boolean; return arr.some(fn); }; export default any;