@pushrocks/lik
Advanced tools
Comparing version 4.0.19 to 4.0.20
@@ -9,2 +9,6 @@ import * as plugins from './lik.plugins'; | ||
} | ||
export interface IObjectMapEventData<T> { | ||
operation: 'add' | 'remove'; | ||
payload: T; | ||
} | ||
/** | ||
@@ -15,3 +19,3 @@ * allows keeping track of objects | ||
private fastMap; | ||
eventSubject: plugins.smartrx.rxjs.Subject<any>; | ||
eventSubject: plugins.smartrx.rxjs.Subject<IObjectMapEventData<T>>; | ||
/** | ||
@@ -36,3 +40,2 @@ * returns a new instance | ||
removeMappedUnique(uniqueKey: string): void; | ||
addSubject: plugins.smartrx.rxjs.Subject<T>; | ||
/** | ||
@@ -39,0 +42,0 @@ * add object to Objectmap |
@@ -43,3 +43,2 @@ "use strict"; | ||
this.eventSubject = new plugins.smartrx.rxjs.Subject(); | ||
this.addSubject = new plugins.smartrx.rxjs.Subject(); | ||
// nothing here | ||
@@ -84,3 +83,6 @@ } | ||
this.addMappedUnique(uniqueKey, objectArg); | ||
this.addSubject.next(objectArg); | ||
this.eventSubject.next({ | ||
operation: 'add', | ||
payload: objectArg | ||
}); | ||
return uniqueKey; | ||
@@ -157,3 +159,6 @@ } | ||
const removedItem = this.fastMap.removeFromMap(keyToUse); | ||
this.eventSubject.next('remove'); | ||
this.eventSubject.next({ | ||
operation: 'remove', | ||
payload: removedItem | ||
}); | ||
return removedItem; | ||
@@ -185,3 +190,6 @@ } | ||
const removedObject = this.fastMap.removeFromMap(keyArg); | ||
this.eventSubject.next('remove'); | ||
this.eventSubject.next({ | ||
operation: 'remove', | ||
payload: removedObject | ||
}); | ||
return removedObject; | ||
@@ -218,2 +226,2 @@ } | ||
exports.ObjectMap = ObjectMap; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlrLm9iamVjdG1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2xpay5vYmplY3RtYXAudHMiXSwibmFtZXMiOltdL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FNLElBQUksSUFBSSxDQUFDLE9BQU8sQ0FBQyxPQUFPLEVBQUUsRUFBRTtZQUMzQyxJQUFJLENBQUMsT0FBTyxDQUFDLGFBQWEsQ0FBQyxNQUFNLENBQUMsQ0FBQztTQUNwQztJQUNILENBQUM7SUFFRDs7T0FFRztJQUNJLE1BQU0sQ0FBQyxZQUEwQjtRQUN0QyxNQUFNLGtCQUFrQixHQUFHLElBQUksU0FBUyxFQUFLLENBQUM7UUFDOUMsa0JBQWtCLENBQUMsT0FBTyxDQUFDLGVBQWUsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUM7UUFDekQsa0JBQWtCLENBQUMsT0FBTyxDQUFDLGVBQWUsQ0FBQyxZQUFZLENBQUMsT0FBTyxDQUFDLENBQUM7UUFDakUsT0FBTyxrQkFBa0IsQ0FBQztJQUM1QixDQUFDO0lBRUQ7Ozs7T0FJRztJQUNJLGVBQWUsQ0FBQyxZQUEwQjtRQUMvQyxJQUFJLENBQUMsT0FBTyxDQUFDLGVBQWUsQ0FBQyxZQUFZLENBQUMsT0FBTyxDQUFDLENBQUM7SUFDckQsQ0FBQztDQUNGO0FBM01ELDhCQTJNQyJ9 |
{ | ||
"name": "@pushrocks/lik", | ||
"version": "4.0.19", | ||
"version": "4.0.20", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "light little helpers for node", |
@@ -20,2 +20,7 @@ import * as plugins from './lik.plugins'; | ||
export interface IObjectMapEventData<T> { | ||
operation: 'add' | 'remove'; | ||
payload: T; | ||
} | ||
/** | ||
@@ -28,3 +33,3 @@ * allows keeping track of objects | ||
// events | ||
public eventSubject = new plugins.smartrx.rxjs.Subject<any>(); | ||
public eventSubject = new plugins.smartrx.rxjs.Subject<IObjectMapEventData<T>>(); | ||
@@ -62,4 +67,2 @@ /** | ||
public addSubject = new plugins.smartrx.rxjs.Subject<T>(); | ||
/** | ||
@@ -82,3 +85,6 @@ * add object to Objectmap | ||
this.addMappedUnique(uniqueKey, objectArg); | ||
this.addSubject.next(objectArg); | ||
this.eventSubject.next({ | ||
operation: 'add', | ||
payload: objectArg | ||
}); | ||
return uniqueKey; | ||
@@ -160,3 +166,6 @@ } | ||
const removedItem = this.fastMap.removeFromMap(keyToUse); | ||
this.eventSubject.next('remove'); | ||
this.eventSubject.next({ | ||
operation: 'remove', | ||
payload: removedItem | ||
}); | ||
return removedItem; | ||
@@ -191,3 +200,6 @@ } | ||
const removedObject = this.fastMap.removeFromMap(keyArg); | ||
this.eventSubject.next('remove'); | ||
this.eventSubject.next({ | ||
operation: 'remove', | ||
payload: removedObject | ||
}); | ||
return removedObject; | ||
@@ -194,0 +206,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1648268
15032