3.0.3 • Published 6 years ago

apr-find v3.0.3

Weekly downloads
478
License
MIT
Repository
github
Last release
6 years ago

find

Returns the first value in coll that passes an async truth test.

npm.io npm.io

Parameters

Examples

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

series

Parameters

Returns Promise

limit

Parameters

Returns Promise