# @iinc/a2a

> Async await to Array

Latest version **0.1.0** (published 2018-09-10) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @iinc/a2a
pnpm add @iinc/a2a
yarn add @iinc/a2a
bun add @iinc/a2a
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-09-10 |
| First published | 2018-09-10 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Invertase Limited |
| Maintainers | ehesp, salakar |
| Keywords | async, await, async await, promise |

## Links

- npm: https://www.npmjs.com/package/@iinc/a2a
- Repository: https://github.com/invertase-incubator/a2a
- Homepage: https://github.com/invertase-incubator/a2a#readme
- Issues: https://github.com/invertase-incubator/a2a/issues
- npm.io page: https://npm.io/package/@iinc/a2a

## Alternatives

- [promise-throttle](https://npm.io/package/promise-throttle.md) — 44.2K weekly downloads
- [@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

## Recent versions

- 0.1.0 (latest) — 2018-09-10

## README

# A2A - Async Await to Array

Simplify your promise workflow.

## Install

```bash
npm install --save @iinc/a2a
```

## Example

```js
const A2A = require('@iinc/a2a');
const axios = require('axios');

async function example1() {
  const [ error, users ] = await A2A(axios.get('https://api.com/users'));
  if (error) {
    // ... do something
  }

  console.log('Users', users);
}

async function example2() {
  const [ error, [ users, profile ] ] = await A2A([
    axios.get('https://api.com/users'),
    axios.get('https://api.com/profile'),
  ]);
  
  if (error) {
    // ... do something
  }
  
  console.log('Users', users);
  console.log('Profile', profile);
}

example1();
example2();
```

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