https://github.com/henryruhs/rxjs-collection
RXJS enhanced Array, Map, WeakMap, Set and WeakSet
https://github.com/henryruhs/rxjs-collection
Last synced: about 1 month ago
JSON representation
RXJS enhanced Array, Map, WeakMap, Set and WeakSet
- Host: GitHub
- URL: https://github.com/henryruhs/rxjs-collection
- Owner: henryruhs
- License: other
- Created: 2022-08-19T16:31:05.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-07T13:59:36.000Z (3 months ago)
- Last Synced: 2025-03-18T03:35:53.852Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 67.4 KB
- Stars: 5
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- fucking-awesome-angular - rxjs-collection - RxJS enhanced Array, Map, WeakMap, Set and WeakSet. (Table of contents / Third Party Components)
- awesome-angular - rxjs-collection - RxJS enhanced Array, Map, WeakMap, Set and WeakSet. (Table of contents / Third Party Components)
README
RXJS Collection
===============> RXJS enhanced Array, Map, WeakMap, Set and WeakSet.
[](https://github.com/henryruhs/rxjs-collection/actions?query=workflow:ci)
[](https://coveralls.io/r/henryruhs/rxjs-collection)
[](https://npmjs.com/package/rxjs-collection)
[](https://npmjs.com/package/rxjs-collection)Installation
------------```
npm install rxjs-collection
```Usage
-----Each collection has been enhanced with `asObservable` and `{un}subscribe` alike methods:
```typescript
import { ReactiveMap } from 'rxjs-collection';const reactiveMap : ReactiveMap = new ReactiveMap();
// 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 [documentation](https://henryruhs.gitbook.io/rxjs-collection) for a deep dive.