Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ukon1990/subscription-manager

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ukon1990/subscription-manager - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

13

dist/subscription-manager.js

@@ -26,6 +26,7 @@ "use strict";

add(emitter, fun, options) {
const s = emitter.subscribe((data) => {
const subscription = emitter
.subscribe((data) => {
if (options && options.terminateUponEvent) {
if (s) {
s.unsubscribe();
if (subscription) {
subscription.unsubscribe();
}

@@ -35,7 +36,7 @@ }

});
this.list.push(s);
this.list.push(subscription);
if (options && options.id) {
this.map.set(options.id, s);
this.map.set(options.id, subscription);
}
return s;
return subscription;
}

@@ -42,0 +43,0 @@ unsubscribe() {

{
"name": "@ukon1990/subscription-manager",
"version": "1.0.1",
"version": "1.0.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

# RXjs Subscription manager
This does hopefully make subscription management less tedious, and helps clean up your code with less variables.
You can install it like this:``npm i --save @ukon1990/subscription-manager``
Originally this code base were written before I found out about the

@@ -5,0 +7,0 @@ basic ``subscription.add()``, but then you need to write more code manually. But i still find this method preferable,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc