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

@pushrocks/smartrx

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pushrocks/smartrx - npm Package Compare versions

Comparing version 2.0.26 to 2.0.27

6

dist_ts/index.d.ts

@@ -1,4 +0,4 @@

export * from './smartrx.classes.observablemap.js';
export * from './smartrx.classes.observableintake.js';
import * as rxjs from './smartrx.plugins.rxjs.js';
export * from './smartrx.classes.observablemap';
export * from './smartrx.classes.observableintake';
import * as rxjs from './smartrx.plugins.rxjs';
export { rxjs };

@@ -1,6 +0,31 @@

import './smartrx.plugins.js';
export * from './smartrx.classes.observablemap.js';
export * from './smartrx.classes.observableintake.js';
import * as rxjs from './smartrx.plugins.rxjs.js';
export { rxjs };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUF5QixzQkFBc0IsQ0FBQztBQUNoRCxjQUFjLG9DQUFvQyxDQUFDO0FBQ25ELGNBQWMsdUNBQXVDLENBQUM7QUFDdEQsT0FBTyxLQUFLLElBQUksTUFBTSwyQkFBMkIsQ0FBQztBQUNsRCxPQUFPLEVBQ0wsSUFBSSxFQUNMLENBQUEifQ==
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.rxjs = void 0;
require("./smartrx.plugins");
__exportStar(require("./smartrx.classes.observablemap"), exports);
__exportStar(require("./smartrx.classes.observableintake"), exports);
const rxjs = __importStar(require("./smartrx.plugins.rxjs"));
exports.rxjs = rxjs;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsNkJBQTZDO0FBQzdDLGtFQUFnRDtBQUNoRCxxRUFBbUQ7QUFDbkQsNkRBQStDO0FBRTdDLG9CQUFJIn0=

@@ -1,2 +0,2 @@

import * as rxjs from './smartrx.plugins.rxjs.js';
import * as rxjs from './smartrx.plugins.rxjs';
/**

@@ -3,0 +3,0 @@ * ObservableIntake

@@ -1,7 +0,29 @@

import * as plugins from './smartrx.plugins.js';
import * as rxjs from './smartrx.plugins.rxjs.js';
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ObservableIntake = void 0;
const plugins = __importStar(require("./smartrx.plugins"));
const rxjs = __importStar(require("./smartrx.plugins.rxjs"));
/**
* ObservableIntake
*/
export class ObservableIntake {
class ObservableIntake {
constructor() {

@@ -19,3 +41,3 @@ this.observableFunctions = {

this.payloadBuffer = [];
this.observable = new rxjs.Observable((observerArg) => {
this.observable = rxjs.Observable.create((observerArg) => {
this.observableFunctions.next = (...args) => {

@@ -95,2 +117,3 @@ return observerArg.next(args);

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRyeC5jbGFzc2VzLm9ic2VydmFibGVpbnRha2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHJ4LmNsYXNzZXMub2JzZXJ2YWJsZWludGFrZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLHNCQUFzQixDQUFDO0FBRWhELE9BQU8sS0FBSyxJQUFJLE1BQU0sMkJBQTJCLENBQUM7QUFFbEQ7O0dBRUc7QUFDSCxNQUFNLE9BQU8sZ0JBQWdCO0lBZ0IzQjtRQVpRLHdCQUFtQixHQUFRO1lBQ2pDLElBQUksRUFBRSxDQUFDLFVBQWEsRUFBRSxFQUFFO2dCQUN0QixVQUFVO1lBQ1osQ0FBQztZQUNELFFBQVEsRUFBRSxDQUFDLFVBQWEsRUFBRSxFQUFFO2dCQUMxQixVQUFVO1lBQ1osQ0FBQztTQUNGLENBQUM7UUFDTSxjQUFTLEdBQWlCLElBQUksQ0FBQztRQUMvQixhQUFRLEdBQUcsS0FBSyxDQUFDO1FBQ2pCLGtCQUFhLE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'./smartrx.plugins.rxjs';
export interface IEventEmitter<T = any> {

@@ -8,5 +8,5 @@ on: (eventNameArg: string, eventHandlerArg: (eventPayload: T) => any) => void;

*/
export interface IObservableEventBundle<T> {
subject: rxjs.Subject<any>;
eventRef: T;
export interface IObservableEmitterBundle {
observable: rxjs.Observable<any>;
emitter: IEventEmitter<unknown>;
event: string;

@@ -18,10 +18,8 @@ }

export declare class Observablemap {
observableEventEmitterBundleArray: IObservableEventBundle<IEventEmitter<unknown>>[];
observableEventTargetBundleArray: IObservableEventBundle<EventTarget>[];
observableEmitterBundleArray: IObservableEmitterBundle[];
/**
* creates a hot subject if not yet registered for the event.
* creates a new observable if not yet registered for the same event.
* In case event has been registered before the same observable is returned.
*/
getSubjectForEmitterEvent<T>(emitterArg: IEventEmitter<T>, eventArg: string): rxjs.Subject<T>;
getSubjectForEventTarget<T>(eventTargetArg: EventTarget, eventNameArg: string): rxjs.Subject<T>;
getObservableForEmitterEvent<T>(emitterArg: IEventEmitter<T>, eventArg: string): rxjs.Observable<any>;
}

@@ -1,54 +0,55 @@

import './smartrx.plugins.js';
import * as rxjs from './smartrx.plugins.rxjs.js';
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Observablemap = void 0;
require("./smartrx.plugins");
const rxjs = __importStar(require("./smartrx.plugins.rxjs"));
/**
* manages observables by making sure that only one observable is regsitered per event
*/
export class Observablemap {
class Observablemap {
constructor() {
this.observableEventEmitterBundleArray = new Array();
this.observableEventTargetBundleArray = new Array();
this.observableEmitterBundleArray = new Array();
}
/**
* creates a hot subject if not yet registered for the event.
* creates a new observable if not yet registered for the same event.
* In case event has been registered before the same observable is returned.
*/
getSubjectForEmitterEvent(emitterArg, eventArg) {
const existingBundle = this.observableEventEmitterBundleArray.find((bundleArg) => {
return bundleArg.eventRef === emitterArg && bundleArg.event === eventArg;
getObservableForEmitterEvent(emitterArg, eventArg) {
const existingBundle = this.observableEmitterBundleArray.find((bundleArg) => {
return bundleArg.emitter === emitterArg && bundleArg.event === eventArg;
});
if (existingBundle) {
return existingBundle.subject;
return existingBundle.observable;
}
else {
const emitterObservable = rxjs.fromEvent(emitterArg, eventArg);
const emitterSubject = new rxjs.Subject();
emitterObservable.subscribe(emitterSubject);
const newBundle = {
subject: emitterSubject,
eventRef: emitterArg,
this.observableEmitterBundleArray.push({
observable: emitterObservable,
emitter: emitterArg,
event: eventArg,
};
this.observableEventEmitterBundleArray.push(newBundle);
return newBundle.subject;
});
return emitterObservable;
}
}
getSubjectForEventTarget(eventTargetArg, eventNameArg) {
const existingBundle = this.observableEventTargetBundleArray.find((bundleArg) => {
return bundleArg.eventRef === eventTargetArg && bundleArg.event === eventNameArg;
});
if (existingBundle) {
return existingBundle.subject;
}
else {
const emitterSubject = new rxjs.Subject();
const newBundle = {
subject: emitterSubject,
eventRef: eventTargetArg,
event: eventNameArg,
};
this.observableEventTargetBundleArray.push(newBundle);
return newBundle.subject;
}
}
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRyeC5jbGFzc2VzLm9ic2VydmFibGVtYXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHJ4LmNsYXNzZXMub2JzZXJ2YWJsZW1hcC50cyJdLCJuYW1lcyI6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DO0FBQzdDLDZEQUErQztBQWUvQzs7R0FFRztBQUNILE1BQWEsYUFBYTtJQUExQjtRQUNTLGlDQUE0QixHQUFHLElBQUksS0FBSyxFQUE0QixDQUFDO0lBc0I5RSxDQUFDO0lBcEJDOzs7T0FHRztJQUNJLDRCQUE0QixDQUFJLFVBQTRCLEVBQUUsUUFBZ0I7UUFDbkYsTUFBTSxjQUFjLEdBQUcsSUFBSSxDQUFDLDRCQUE0QixDQUFDLElBQUksQ0FBQyxDQUFDLFNBQVMsRUFBRSxFQUFFO1lBQzFFLE9BQU8sU0FBUyxDQUFDLE9BQU8sS0FBSyxVQUFVLElBQUksU0FBUyxDQUFDLEtBQUssS0FBSyxRQUFRLENBQUM7UUFDMUUsQ0FBQyxDQUFDLENBQUM7UUFDSCxJQUFJLGNBQWMsRUFBRTtZQUNsQixPQUFPLGNBQWMsQ0FBQyxVQUFVLENBQUM7U0FDbEM7YUFBTTtZQUNMLE1BQU0saUJBQWlCLEdBQUcsSUFBSSxDQUFDLFNBQVMsQ0FBSSxVQUFpQixFQUFFLFFBQVEsQ0FBQyxDQUFDO1lBQ3pFLElBQUksQ0FBQyw0QkFBNEIsQ0FBQyxJQUFJLENBQUM7Z0JBQ3JDLFVBQVUsRUFBRSxpQkFBaUI7Z0JBQzdCLE9BQU8sRUFBRSxVQUFVO2dCQUNuQixLQUFLLEVBQUUsUUFBUTthQUNoQixDQUFDLENBQUM7WUFDSCxPQUFPLGlCQUFpQixDQUFDO1NBQzFCO0lBQ0gsQ0FBQztDQUNGO0FBdkJELHNDQXVCQyJ9

@@ -1,3 +0,25 @@

import * as smartpromise from '@pushrocks/smartpromise';
export { smartpromise };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRyeC5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRyeC5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxZQUFZLE1BQU0seUJBQXlCLENBQUM7QUFFeEQsT0FBTyxFQUFFLFlBQVksRUFBRSxDQUFDIn0=
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.smartpromise = void 0;
const smartpromise = __importStar(require("@pushrocks/smartpromise"));
exports.smartpromise = smartpromise;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRyeC5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRyeC5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxzRUFBd0Q7QUFFL0Msb0NBQVkifQ==

@@ -1,3 +0,2 @@

export { Observable, Subject, fromEvent, ReplaySubject, Subscription } from 'rxjs';
export type { Observer } from 'rxjs';
export { Observable, Subject, fromEvent, ReplaySubject, Subscription, Observer } from 'rxjs';
import { startWith, takeUntil, map, debounce, debounceTime } from 'rxjs/operators';

@@ -4,0 +3,0 @@ export declare const ops: {

@@ -0,11 +1,19 @@

"use strict";
// this file is intended to keep the bundle size down
export { Observable, Subject, fromEvent, ReplaySubject, Subscription } from 'rxjs';
import { startWith, takeUntil, map, debounce, debounceTime } from 'rxjs/operators';
export const ops = {
debounce,
debounceTime,
map,
startWith,
takeUntil,
Object.defineProperty(exports, "__esModule", { value: true });
exports.ops = exports.Subscription = exports.ReplaySubject = exports.fromEvent = exports.Subject = exports.Observable = void 0;
var rxjs_1 = require("rxjs");
Object.defineProperty(exports, "Observable", { enumerable: true, get: function () { return rxjs_1.Observable; } });
Object.defineProperty(exports, "Subject", { enumerable: true, get: function () { return rxjs_1.Subject; } });
Object.defineProperty(exports, "fromEvent", { enumerable: true, get: function () { return rxjs_1.fromEvent; } });
Object.defineProperty(exports, "ReplaySubject", { enumerable: true, get: function () { return rxjs_1.ReplaySubject; } });
Object.defineProperty(exports, "Subscription", { enumerable: true, get: function () { return rxjs_1.Subscription; } });
const operators_1 = require("rxjs/operators");
exports.ops = {
debounce: operators_1.debounce,
debounceTime: operators_1.debounceTime,
map: operators_1.map,
startWith: operators_1.startWith,
takeUntil: operators_1.takeUntil,
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRyeC5wbHVnaW5zLnJ4anMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHJ4LnBsdWdpbnMucnhqcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxxREFBcUQ7QUFFckQsT0FBTyxFQUFFLFVBQVUsRUFBRSxPQUFPLEVBQUUsU0FBUyxFQUFFLGFBQWEsRUFBRSxZQUFZLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFJbkYsT0FBTyxFQUFFLFNBQVMsRUFBRSxTQUFTLEVBQUUsR0FBRyxFQUFFLFFBQVEsRUFBRSxZQUFZLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUVuRixNQUFNLENBQUMsTUFBTSxHQUFHLEdBQUc7SUFDakIsUUFBUTtJQUNSLFlBQVk7SUFDWixHQUFHO0lBQ0gsU0FBUztJQUNULFNBQVM7Q0FDVixDQUFDIn0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRyeC5wbHVnaW5zLnJ4anMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHJ4LnBsdWdpbnMucnhqcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEscURBQXFEOzs7QUFFckQsNkJBQTZGO0FBQXBGLGtHQUFBLFVBQVUsT0FBQTtBQUFFLCtGQUFBLE9BQU8sT0FBQTtBQUFFLGlHQUFBLFNBQVMsT0FBQTtBQUFFLHFHQUFBLGFBQWEsT0FBQTtBQUFFLG9HQUFBLFlBQVksT0FBQTtBQUVwRSw4Q0FBbUY7QUFFdEUsUUFBQSxHQUFHLEdBQUc7SUFDakIsUUFBUSxFQUFSLG9CQUFRO0lBQ1IsWUFBWSxFQUFaLHdCQUFZO0lBQ1osR0FBRyxFQUFILGVBQUc7SUFDSCxTQUFTLEVBQVQscUJBQVM7SUFDVCxTQUFTLEVBQVQscUJBQVM7Q0FDVixDQUFDIn0=
{
"name": "@pushrocks/smartrx",
"version": "2.0.26",
"version": "2.0.27",
"private": false,

@@ -8,3 +8,2 @@ "description": "smart wrapper for rxjs",

"typings": "dist_ts/index.d.ts",
"type": "module",
"author": "Lossless GmbH",

@@ -17,8 +16,8 @@ "license": "MIT",

"devDependencies": {
"@gitzone/tsbuild": "^2.1.65",
"@gitzone/tsbundle": "^2.0.7",
"@gitzone/tsrun": "^1.2.37",
"@gitzone/tstest": "^1.0.73",
"@pushrocks/tapbundle": "^5.0.4",
"@types/node": "^18.6.4",
"@gitzone/tsbuild": "^2.1.29",
"@gitzone/tsbundle": "^1.0.89",
"@gitzone/tsrun": "^1.2.18",
"@gitzone/tstest": "^1.0.60",
"@pushrocks/tapbundle": "^4.0.0",
"@types/node": "^17.0.10",
"tslint": "^6.1.3",

@@ -28,4 +27,4 @@ "tslint-config-prettier": "^1.18.0"

"dependencies": {
"@pushrocks/smartpromise": "^3.1.7",
"rxjs": "^7.5.6"
"@pushrocks/smartpromise": "^3.1.6",
"rxjs": "^7.5.2"
},

@@ -32,0 +31,0 @@ "files": [

@@ -1,7 +0,7 @@

import * as plugins from './smartrx.plugins.js';
export * from './smartrx.classes.observablemap.js';
export * from './smartrx.classes.observableintake.js';
import * as rxjs from './smartrx.plugins.rxjs.js';
import * as plugins from './smartrx.plugins';
export * from './smartrx.classes.observablemap';
export * from './smartrx.classes.observableintake';
import * as rxjs from './smartrx.plugins.rxjs';
export {
rxjs
}

@@ -1,4 +0,4 @@

import * as plugins from './smartrx.plugins.js';
import * as plugins from './smartrx.plugins';
import * as rxjs from './smartrx.plugins.rxjs.js';
import * as rxjs from './smartrx.plugins.rxjs';

@@ -25,3 +25,3 @@ /**

constructor() {
this.observable = new rxjs.Observable((observerArg: rxjs.Observer<any>) => {
this.observable = rxjs.Observable.create((observerArg: rxjs.Observer<any>) => {
this.observableFunctions.next = (...args: any) => {

@@ -28,0 +28,0 @@ return observerArg.next(args);

@@ -1,3 +0,3 @@

import * as plugins from './smartrx.plugins.js';
import * as rxjs from './smartrx.plugins.rxjs.js';
import * as plugins from './smartrx.plugins';
import * as rxjs from './smartrx.plugins.rxjs';

@@ -11,5 +11,5 @@ export interface IEventEmitter<T = any> {

*/
export interface IObservableEventBundle<T> {
subject: rxjs.Subject<any>;
eventRef: T;
export interface IObservableEmitterBundle {
observable: rxjs.Observable<any>;
emitter: IEventEmitter<unknown>;
event: string;

@@ -22,54 +22,24 @@ }

export class Observablemap {
public observableEventEmitterBundleArray = new Array<
IObservableEventBundle<IEventEmitter<unknown>>
>();
public observableEventTargetBundleArray = new Array<IObservableEventBundle<EventTarget>>();
public observableEmitterBundleArray = new Array<IObservableEmitterBundle>();
/**
* creates a hot subject if not yet registered for the event.
* creates a new observable if not yet registered for the same event.
* In case event has been registered before the same observable is returned.
*/
public getSubjectForEmitterEvent<T>(
emitterArg: IEventEmitter<T>,
eventArg: string
): rxjs.Subject<T> {
const existingBundle = this.observableEventEmitterBundleArray.find((bundleArg) => {
return bundleArg.eventRef === emitterArg && bundleArg.event === eventArg;
public getObservableForEmitterEvent<T>(emitterArg: IEventEmitter<T>, eventArg: string) {
const existingBundle = this.observableEmitterBundleArray.find((bundleArg) => {
return bundleArg.emitter === emitterArg && bundleArg.event === eventArg;
});
if (existingBundle) {
return existingBundle.subject;
return existingBundle.observable;
} else {
const emitterObservable = rxjs.fromEvent<T>(emitterArg as any, eventArg);
const emitterSubject = new rxjs.Subject();
emitterObservable.subscribe(emitterSubject);
const newBundle: IObservableEventBundle<IEventEmitter> = {
subject: emitterSubject,
eventRef: emitterArg,
this.observableEmitterBundleArray.push({
observable: emitterObservable,
emitter: emitterArg,
event: eventArg,
};
this.observableEventEmitterBundleArray.push(newBundle);
return newBundle.subject;
});
return emitterObservable;
}
}
public getSubjectForEventTarget<T>(
eventTargetArg: EventTarget,
eventNameArg: string
): rxjs.Subject<T> {
const existingBundle = this.observableEventTargetBundleArray.find((bundleArg) => {
return bundleArg.eventRef === eventTargetArg && bundleArg.event === eventNameArg;
});
if (existingBundle) {
return existingBundle.subject;
} else {
const emitterSubject = new rxjs.Subject();
const newBundle: IObservableEventBundle<EventTarget> = {
subject: emitterSubject,
eventRef: eventTargetArg,
event: eventNameArg,
};
this.observableEventTargetBundleArray.push(newBundle);
return newBundle.subject;
}
}
}
// this file is intended to keep the bundle size down
export { Observable, Subject, fromEvent, ReplaySubject, Subscription } from 'rxjs';
export { Observable, Subject, fromEvent, ReplaySubject, Subscription, Observer } from 'rxjs';
export type { Observer } from 'rxjs';
import { startWith, takeUntil, map, debounce, debounceTime } from 'rxjs/operators';

@@ -8,0 +6,0 @@

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