array-find-es6
Fork of array-find to make it an ES6 type module.
ES 2015 Array.find
ponyfill.
Ponyfill: A polyfill that doesn't overwrite the native method.
Find array elements. Executes a callback for each element, returns the first element for which its callback returns a truthy value.
Usage
;const numbers = 1 2 3 4; ;// => 2 const robots = name: 'Flexo' name: 'Bender' name: 'Buster'; ;// => {name: 'Bender'} ;// => undefined
Optionally pass in an object as third argument to use as this
when executing callback.
Install
$ npm install array-find
License
MIT