# apr-find

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

Latest version **3.0.3** (published 2018-01-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install apr-find
pnpm add apr-find
yarn add apr-find
bun add apr-find
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.3 |
| Published | 2018-01-28 |
| First published | 2017-02-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 75 |
| Author | Sérgio Ramos |
| Maintainers | ramitos |
| Keywords | find, async, await, promise, control, flow, control-flow, awaitful, promises, async-await, es2015, es2016, es2017, es6, es7, es8 |

## Links

- npm: https://www.npmjs.com/package/apr-find
- Repository: https://github.com/ramitos/apr
- Homepage: https://apr.js.org/#find
- Issues: https://github.com/ramitos/apr/issues
- npm.io page: https://npm.io/package/apr-find

## Dependencies (4)

- [apr-engine-sum](https://npm.io/package/apr-engine-sum.md) ^3.0.3
- [apr-engine-each](https://npm.io/package/apr-engine-each.md) ^3.0.3
- [lodash.defaults](https://npm.io/package/lodash.defaults.md) ^4.2.0
- [lodash.isarraylike](https://npm.io/package/lodash.isarraylike.md) ^4.2.0

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 3.0.3 (latest) — 2018-01-28
- 3.0.2 — 2018-01-23
- 3.0.1 — 2018-01-23
- 3.0.0 — 2018-01-23
- 1.0.5 — 2017-05-12
- 1.0.4 — 2017-05-11
- 1.0.3 — 2017-02-26
- 1.0.2 — 2017-02-25
- 1.0.1 — 2017-02-09
- 1.0.0 — 2017-02-08

## README

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## find

<a id="find"></a>
Returns the first value in `coll` that passes an async truth test.

[![](https://img.shields.io/npm/v/apr-find.svg?style=flat-square)](https://www.npmjs.com/package/apr-find) [![](https://img.shields.io/npm/l/apr-find.svg?style=flat-square)](https://www.npmjs.com/package/apr-find)

**Parameters**

-   `input` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) | Iterable)** 
-   `iteratee` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/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](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** 

### series

**Parameters**

-   `input` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) | Iterable)** 
-   `iteratee` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** 

### limit

**Parameters**

-   `input` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) | Iterable)** 
-   `limit` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** 
-   `iteratee` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)**

---
_Source: https://npm.io/package/apr-find · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
