@fgaudo/fp-ts-rxjs
v0.1.2-6
Published
RxJS bindings for fp-ts
Downloads
6
Readme
This library provides fp-ts bindings for rxjs. It is meant as a light alternative to fp-ts-rxjs.
Motivation
- fp-ts-rxjs is currently fixed to rxjs 6 due to #63 and doesn't seem to be getting any updates.
- I don't agree with some of the implementations and instances used in fp-ts-rxjs.
Installation
npm install @fgaudo/fp-ts-rxjs
IMPORTANT NOTES
- New functions will be incorporated as per my personal needs and requirements over time. If you specifically need one, just open an issue. :)
Example
import * as RO from '@fgaudo/fp-ts-rxjs/ReaderObservable'
import * as R from 'fp-ts/Reader'
import * as Rx from 'rxjs'
import { pipe } from 'fp-ts/function'
pipe(
Rx.of('Answer to everything:'),
R.of,
RO.switchMap(text => R.asks(answer => Rx.of(`${text} ${answer}`)))
)('42').subscribe(console.log)