Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/nestarz/pipe
- Owner: nestarz
- Created: 2023-05-22T08:33:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-22T08:51:54.000Z (over 1 year ago)
- Last Synced: 2024-11-22T00:51:41.857Z (about 1 month ago)
- Topics: async-await, browser, deno, functional-programming, typescript
- Language: TypeScript
- Homepage: https://deno.land/x/pipe
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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[]) => Promiseawait fn(1, 2, 3, 4, 5) // 1150
```