Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/langhuihui/streamrx
https://github.com/langhuihui/streamrx
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/langhuihui/streamrx
- Owner: langhuihui
- Created: 2022-07-15T02:17:19.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-07-27T02:50:14.000Z (over 2 years ago)
- Last Synced: 2024-09-17T06:54:39.251Z (2 months ago)
- Language: TypeScript
- Homepage: streamrx.vercel.app
- Size: 64.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# streamrx
Implementing RxJs with Streams API
[what is Streams API](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API)
## install
npm
```
npm i streamrx
```
yarn
```
yarn add streamrx
```
pnpm
```
pnpm i streamrx
```## usage
```ts
import { interval, takeWhile, map } from 'streamrx';interval(1000)
.pipeThrough(map(x => 10 - x))
.pipeThrough(takeWhile(x => x > 0))
.pipeTo(new WritableStream({
write(chunk) {
console.log(chunk);
}
}));
```