Socket
Book a DemoInstallSign in
Socket

@tutils/subx

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tutils/subx

RxJS subscriptions management

0.4.10
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

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
  • Changelog
  • SubxList
  • SubxMap
  • License

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.

FAQs

Package last updated on 12 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.