Returns the first value in coll that passes an async truth test.
npm install apr-find
Returns the first value in coll that passes an async truth test.
 
Parameters
- input (Array \| Object | Iterable)
- iteratee Function
Examples
``javascript
import awaitify from 'apr-awaitify';
import find from 'apr-find';
const access = awaitify(fs.access);
const files = [
'file1',
'file2',
'file3'
];
const first = await find(files, async (file) =>
await access(file)
);
`
Returns Promise
Parameters
- input (Array \| Object | Iterable) iteratee
- Function
Returns Promise
Parameters
- input (Array \| Object | Iterable) limit
- Number iteratee` Function
-
Returns Promise