@fgaudo/fp-ts-rxjs

0.1.2-6 • Public • Published

This library provides fp-ts bindings for rxjs. It is meant as a light alternative to fp-ts-rxjs.

Motivation

  1. fp-ts-rxjs is currently fixed to rxjs 6 due to #63 and doesn't seem to be getting any updates.
  2. 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)

/@fgaudo/fp-ts-rxjs/

    Package Sidebar

    Install

    npm i @fgaudo/fp-ts-rxjs

    Weekly Downloads

    2

    Version

    0.1.2-6

    License

    MIT

    Unpacked Size

    43 kB

    Total Files

    27

    Last publish

    Collaborators

    • fgaudo