Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blu-j/ts-pipe
Being able to pipe data through functions or compose a piped function.
https://github.com/blu-j/ts-pipe
Last synced: 18 days ago
JSON representation
Being able to pipe data through functions or compose a piped function.
- Host: GitHub
- URL: https://github.com/blu-j/ts-pipe
- Owner: Blu-J
- License: mit
- Created: 2018-03-12T20:27:26.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T10:28:21.000Z (almost 2 years ago)
- Last Synced: 2024-11-29T03:09:19.151Z (about 1 month ago)
- Language: TypeScript
- Size: 2.14 MB
- Stars: 8
- Watchers: 4
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ts-pipe
![Node.js CI](https://github.com/Blu-J/ts-pipe/workflows/Node.js%20CI/badge.svg)
![Bundle Phobia](https://badgen.net/bundlephobia/min/ts-pipe)
![Bundle Phobia](https://badgen.net/bundlephobia/minzip/ts-pipe)
Being able to pipe data through functions or compose a piped function.## Examples
```ts
import { pipeable, lazyPipeable } from "ts-pipe";pipeable("20")
.pipe((x) => Number(x))
.pipe((x) => x + 5).value; // 25const lazyPiped = lazyPipeable((x) => Number(x)).pipe((x) => x + 5);
lazyPiped.call("14"); // 19
```