rxjs-collection

2.1.2 • Public • Published

RXJS Collection

RXJS enhanced Array, Map, WeakMap, Set and WeakSet.

Build Status Coverage Status NPM Version License

Installation

npm install rxjs-collection

Usage

Each collection has been enhanced with asObservable and {un}subscribe alike methods:

import { ReactiveMap } from 'rxjs-collection';

const reactiveMap : ReactiveMap<number, number> = new ReactiveMap<number, number>();

// subscribe to mutations
reactiveMap.asObservable().subscribe(map => map.has(1));
reactiveMap.subscribe(map => map.has(1));

// mutate the collection
reactiveMap.set(1, 1);

// unsubscribe from mutations
reactiveMap.unsubscribe();

Documentation

Read the documenation for a deep dive.

/rxjs-collection/

    Package Sidebar

    Install

    npm i rxjs-collection

    Weekly Downloads

    148

    Version

    2.1.2

    License

    MIT

    Unpacked Size

    13 kB

    Total Files

    6

    Last publish

    Collaborators

    • henryruhs