A tiny, faster alternative to native
Array.prototype.find
@arr/find does not support the optional thisArg parameter!
$ npm install --save @arr/find
import find from '@arr/find';
find([12, 5, 8, 130, 44], val => val > 15);
//=> 130Type: Array
The array to iterate upon.
Type: Function
Function to test for each element, taking three arguments:
- value (required) -- The current element being processed in the array.
- index (optional) -- The index of the current element being processed in the array.
- array (optional) -- The array
findwas called upon.
MIT © Luke Edwards