Lazy Array some. Once fun returns non falsy value, that value is returned and search is suspended
npm install lazy-some
!extending







language: !English
also available in:

sh
$ npm install lazy-some
`Usage
`js
require('lazy-some')(Array);var lines=[
'Line without mail',
'Line with one mail: name@host.dom',
'This line is not searches',
'Another line with mail: other@mail.dom. Not searched'
];
var firstMail=lines.lazySome(function(line){
var match = line.match(/\w+@(?:\w+\.)+\w+/)
return match && match[0];
});
console.log(firstMail); // name@host.dom
`arr.lazySome(fun [, thisArg])
Calls
fun with each array element until a non falsy value was obtained.
Then that value was returned by lazySome.If only falsy values were obtained then
false` was returned.