Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nestarz/pipe

TypeScript Pipe Operator with Async Support
https://github.com/nestarz/pipe

async-await browser deno functional-programming typescript

Last synced: about 1 month ago
JSON representation

TypeScript Pipe Operator with Async Support

Awesome Lists containing this project

README

        

# pipe

```ts
import pipe from "https://deno.land/x/pipe/mod.ts";

const fn = pipe(
(...nbs: number[]) => nbs.reduce((a, b) => a + b, 0),
async (c: number) => c * (await Promise.resolve(10)),
(d: number) => d + 1000
); // const fn: (...args: number[]) => Promise

await fn(1, 2, 3, 4, 5) // 1150
```