1.0.13 • Published 5 years ago

@reaktivo/async-flow v1.0.13

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

async-flow

GitHub license npm version CircleCI Status Coverage PRs Welcome

async-flow is a tiny javascript function piping utility

Installation

npm install -g @reaktivo/async-flow

Usage

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.

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago