@0devs/async-pipe
TypeScript icon, indicating that this package has built-in type declarations

0.7.0 • Public • Published

async-pipe

organize async functions and promises into pipe, like promise.then, promise.catch

original repo kirillrogovoy/promised-pipe

install

npm i @0devs/async-pipe

usage

import {pipe} from "@0devs/async-pipe";

pipe(
  async () => 0,
  async (s) => s + 1,
  async (s) => s + 1,
  async (s) => s + 1,
)
  .then((r) => {
    console.log(r);
  })
  .catch((e) => {
    console.log(e);
  });

Readme

Keywords

none

Package Sidebar

Install

npm i @0devs/async-pipe

Weekly Downloads

7

Version

0.7.0

License

MIT

Unpacked Size

17.4 kB

Total Files

13

Last publish

Collaborators

  • 0devs.team
  • alekzonder