A tiny, faster alternative to native
Array.prototype.some
:warning: Unlike native, @arr/some does not support the optional thisArg parameter!
$ npm install --save @arr/some
import some from '@arr/some';
const isBiggerThan10 = val => val > 10;
some([2, 5, 8, 1, 4], isBiggerThan10);
//=> false
some([12, 5, 8, 1, 4], isBiggerThan10);
//=> true
Type: Array
The array to iterate upon.
Type: Function
Function to test for each element, taking three arguments:
map was called upon.MIT © Luke Edwards