0.4.10 • Published 4 years ago

@tutils/subx v0.4.10

Weekly downloads
6
License
ISC
Repository
github
Last release
4 years ago

SubX

npm bundle size

RxJS Subscriptions management.

Provide Apis to store and manage RxJS subscriptions and provide methods to unsubscribe them all.

Prerequisites

The project has dependencies that require Node 8.9 or higher, together with NPM 5.5.1 or higher.

Contents

Installation

BEFORE YOU INSTALL: please read the prerequisites

npm install @tutils/subx --save

SubxList

Object that holds and manages a list of Subscriptions.

import { SubxList } from '@tutils/subx';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';

const subxList = new SubxList();
const source = new Subject();

const subscription = source.subscribe();
const subscription2 = source.subscribe();

subxList.add(subscription);
subxList.add(subscription2);

...

subxList.unsubscribeAll();

API Reference

SubxMap

Object that holds and manages Key-Subscription pairs.

import { SubxMap } from '@tutils/subx';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';

const subxList = new SubxMap();
const source = new Subject();

const subscription = source.subscribe();
const subscription2 = source.subscribe();

subxList.set('key1', subscription);
subxList.set('key2', subscription2);

...

subxList.unsubscribeAll();

API Reference

License

Copyright (c) Tyrcord, Inc. Licensed under the ISC License.

See LICENSE file in the project root for details.

0.4.10

4 years ago

0.4.7

4 years ago

0.4.6

5 years ago

0.4.0

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago