fix(core): update
This commit is contained in:
parent
037e33caee
commit
610c1d6beb
7948
package-lock.json
generated
7948
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
17
package.json
17
package.json
@ -13,18 +13,18 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.24",
|
||||
"@gitzone/tsbundle": "^1.0.69",
|
||||
"@gitzone/tsbundle": "^1.0.72",
|
||||
"@gitzone/tsrun": "^1.2.12",
|
||||
"@gitzone/tstest": "^1.0.33",
|
||||
"@pushrocks/tapbundle": "^3.2.1",
|
||||
"@types/node": "^14.0.14",
|
||||
"@gitzone/tstest": "^1.0.43",
|
||||
"@pushrocks/tapbundle": "^3.2.9",
|
||||
"@types/node": "^14.0.22",
|
||||
"tslint": "^6.1.2",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": "^4.0.13",
|
||||
"@pushrocks/lik": "^4.0.14",
|
||||
"@pushrocks/smartpromise": "^3.0.6",
|
||||
"rxjs": "^6.5.5"
|
||||
"rxjs": "^6.6.0"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
@ -37,5 +37,8 @@
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
],
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
]
|
||||
}
|
||||
}
|
@ -7,9 +7,9 @@ tap.test('should create a valid instance of observableinstake', async () => {
|
||||
expect(testObservableIntake).to.be.instanceOf(smartrx.ObservableIntake);
|
||||
});
|
||||
|
||||
tap.test('expect testObserservableIntake to push things', async tools => {
|
||||
tap.test('expect testObserservableIntake to push things', async (tools) => {
|
||||
const testObserservableIntake = new smartrx.ObservableIntake();
|
||||
testObserservableIntake.subscribe(value => {
|
||||
testObserservableIntake.subscribe((value) => {
|
||||
console.log(value);
|
||||
});
|
||||
|
||||
@ -19,13 +19,13 @@ tap.test('expect testObserservableIntake to push things', async tools => {
|
||||
await testObserservableIntake.completed;
|
||||
});
|
||||
|
||||
tap.test('expect testObserservableIntake to push things', async tools => {
|
||||
tap.test('expect testObserservableIntake to push things', async (tools) => {
|
||||
const testObserservableIntake = new smartrx.ObservableIntake();
|
||||
testObserservableIntake.push('hi');
|
||||
testObserservableIntake.push('wow');
|
||||
testObserservableIntake.makeBuffered();
|
||||
testObserservableIntake.push('jo');
|
||||
testObserservableIntake.subscribe(value => {
|
||||
testObserservableIntake.subscribe((value) => {
|
||||
console.log(value);
|
||||
testObserservableIntake.signalComplete();
|
||||
});
|
||||
|
@ -22,7 +22,7 @@ tap.test('should accept a new emitter', async () => {
|
||||
let done = smartpromise.defer();
|
||||
testEmitter = new events.EventEmitter();
|
||||
testObservable1 = testObservablemap.getObservableForEmitterEvent(testEmitter, 'event1');
|
||||
testObservable1.subscribe(x => {
|
||||
testObservable1.subscribe((x) => {
|
||||
done.resolve();
|
||||
});
|
||||
testObservable2 = testObservablemap.getObservableForEmitterEvent(testEmitter, 'event1');
|
||||
|
@ -8,19 +8,19 @@ export class ObservableIntake<T> {
|
||||
public completed: Promise<void>;
|
||||
private completedDeffered: plugins.smartpromise.Deferred<void>;
|
||||
private observableFunctions: any = {
|
||||
next: payloadArg => {
|
||||
next: (payloadArg) => {
|
||||
// nothing
|
||||
},
|
||||
complete: payloadArg => {
|
||||
complete: (payloadArg) => {
|
||||
// nothing
|
||||
}
|
||||
},
|
||||
};
|
||||
private generator = null;
|
||||
private buffered = false;
|
||||
private payloadBuffer = [];
|
||||
|
||||
constructor() {
|
||||
this.observable = plugins.rxjs.Observable.create(observerArg => {
|
||||
this.observable = plugins.rxjs.Observable.create((observerArg) => {
|
||||
this.observableFunctions.next = (...args) => {
|
||||
return observerArg.next(...args);
|
||||
};
|
||||
|
@ -24,7 +24,7 @@ export class Observablemap {
|
||||
* In case event has been registered before the same observable is returned.
|
||||
*/
|
||||
public getObservableForEmitterEvent<T>(emitterArg: IEventEmitter<T>, eventArg: string) {
|
||||
const existingBundle = this.observableEmitterBundleObjectmap.find(bundleArg => {
|
||||
const existingBundle = this.observableEmitterBundleObjectmap.find((bundleArg) => {
|
||||
return bundleArg.emitter === emitterArg && bundleArg.event === eventArg;
|
||||
});
|
||||
if (existingBundle) {
|
||||
@ -34,7 +34,7 @@ export class Observablemap {
|
||||
this.observableEmitterBundleObjectmap.add({
|
||||
observable: emitterObservable,
|
||||
emitter: emitterArg,
|
||||
event: eventArg
|
||||
event: eventArg,
|
||||
});
|
||||
return emitterObservable;
|
||||
}
|
||||
|
@ -2,10 +2,12 @@
|
||||
|
||||
export { Observable, Subject, fromEvent, ReplaySubject } from 'rxjs';
|
||||
|
||||
import { startWith, takeUntil, map } from 'rxjs/operators';
|
||||
import { startWith, takeUntil, map, debounce, debounceTime } from 'rxjs/operators';
|
||||
|
||||
export const ops = {
|
||||
debounce,
|
||||
debounceTime,
|
||||
map,
|
||||
startWith,
|
||||
takeUntil,
|
||||
map
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user