0.0.3 • Published 2 years ago

streamrx v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

streamrx

Implementing RxJs with Streams API

what is Streams API

install

npm

npm i streamrx

yarn

yarn add streamrx

pnpm

pnpm i streamrx

usage

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);
      }
}));