# @reaktivo/async-flow

> Composes and awaits single-argument functions from left to right.

Latest version **1.0.13** (published 2019-03-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @reaktivo/async-flow
pnpm add @reaktivo/async-flow
yarn add @reaktivo/async-flow
bun add @reaktivo/async-flow
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2019-03-08 |
| First published | 2018-07-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | reaktivo |
| Keywords | async, flow |

## Links

- npm: https://www.npmjs.com/package/@reaktivo/async-flow
- Repository: https://github.com/reaktivo/async-flow
- Homepage: https://github.com/reaktivo/async-flow#readme
- Issues: https://github.com/reaktivo/async-flow/issues
- npm.io page: https://npm.io/package/@reaktivo/async-flow

## 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

- 1.0.13 (latest) — 2019-03-08
- 1.0.12 — 2019-03-08
- 1.0.11 — 2019-03-08
- 1.0.10 — 2019-03-08
- 1.0.9 — 2018-11-30
- 1.0.8 — 2018-11-30
- 1.0.7 — 2018-11-26
- 1.0.6 — 2018-11-26
- 1.0.5 — 2018-11-26
- 1.0.4 — 2018-07-06
- 1.0.3 — 2018-07-06
- 1.0.2 — 2018-07-04
- 1.0.1 — 2018-07-04
- 1.0.0 — 2018-07-03

## README

# [async-flow](https://github.com/reaktivo/async-flow/)

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/reaktivo/async-flow/blob/master/LICENSE)
[![npm version](https://img.shields.io/npm/v/@reaktivo/async-flow.svg?style=flat)](https://www.npmjs.com/package/@reaktivo/async-flow)
[![CircleCI Status](https://circleci.com/gh/reaktivo/async-flow.svg?style=shield)](https://circleci.com/gh/reaktivo/async-flow)
[![Coverage](https://img.shields.io/codecov/c/github/reaktivo/async-flow.svg)](https://codecov.io/gh/reaktivo/async-flow)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/reaktivo/async-flow/compare)

async-flow is a tiny javascript function piping utility

## Installation

```sh
npm install -g @reaktivo/async-flow
```

## Usage

```js
import asyncFlow from "@reaktivo/async-flow";

const api = asyncFlow(fetch, res => res.json(), json => json.data);

// Which is equivalent to the following
const api = function(...args) {
  return fetch(...args)
    .then(res => res.json())
    .then(json => json.data);
};

//Or
const api = async function(...args) {
  const response = await fetch(...args);
  const json = await response.json();
  return json.data;
};
```

## License

async-flow is open source software [licensed as MIT](https://github.com/reaktivo/async-flow/blob/master/LICENSE).

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