Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
71a1cde491 | |||
487cd53c3b | |||
e050031313 | |||
cbbb31e0e7 | |||
a758196705 | |||
951d260103 | |||
9605721f75 | |||
fe484e334f |
@ -135,13 +135,3 @@ pages:
|
|||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
windowsCompatibility:
|
|
||||||
image: stefanscherer/node-windows:10-build-tools
|
|
||||||
stage: metadata
|
|
||||||
script:
|
|
||||||
- npm install & npm test
|
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
|
||||||
tags:
|
|
||||||
- windows
|
|
||||||
allow_failure: true
|
|
||||||
|
1416
package-lock.json
generated
1416
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "smartrx",
|
"name": "@pushrocks/smartrx",
|
||||||
"version": "2.0.0",
|
"version": "2.0.4",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "smart wrapper for rxjs",
|
"description": "smart wrapper for rxjs",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
@ -12,16 +12,18 @@
|
|||||||
"build": "(tsbuild)"
|
"build": "(tsbuild)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.0.22",
|
"@gitzone/tsbuild": "^2.1.17",
|
||||||
"@gitzone/tsrun": "^1.1.12",
|
"@gitzone/tsrun": "^1.2.8",
|
||||||
"@gitzone/tstest": "^1.0.15",
|
"@gitzone/tstest": "^1.0.24",
|
||||||
"@pushrocks/tapbundle": "^3.0.7",
|
"@pushrocks/tapbundle": "^3.0.13",
|
||||||
"@types/node": "^10.11.6"
|
"@types/node": "^12.7.4",
|
||||||
|
"tslint": "^5.20.0",
|
||||||
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/lik": "^3.0.1",
|
"@pushrocks/lik": "^3.0.11",
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartevent": "^2.0.3",
|
||||||
"rxjs": "^6.3.3",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"smartevent": "^1.0.1"
|
"rxjs": "^6.5.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
import * as plugins from './smartrx.plugins';
|
import * as plugins from './smartrx.plugins';
|
||||||
|
|
||||||
export let standardExport = 'Hi there! :) This is a exported string';
|
|
||||||
export * from './smartrx.classes.observablemap';
|
export * from './smartrx.classes.observablemap';
|
||||||
export * from './smartrx.classes.observableintake';
|
export * from './smartrx.classes.observableintake';
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import * as plugins from './smartrx.plugins';
|
import * as plugins from './smartrx.plugins';
|
||||||
import { Observable, Subscription } from 'rxjs';
|
import { Observable, Subscription } from 'rxjs';
|
||||||
import { Deferred } from 'smartq';
|
import { Deferred } from '@pushrocks/smartpromise';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ObservableIntake
|
* ObservableIntake
|
||||||
*/
|
*/
|
||||||
export class ObservableIntake<T> {
|
export class ObservableIntake<T> {
|
||||||
observable: Observable<T>;
|
public observable: Observable<T>;
|
||||||
completed: Promise<void>;
|
public completed: Promise<void>;
|
||||||
private completedDeffered: Deferred<void>;
|
private completedDeffered: Deferred<void>;
|
||||||
private observableFunctions: any = {
|
private observableFunctions: any = {
|
||||||
next: payloadArg => {
|
next: payloadArg => {
|
||||||
@ -35,11 +35,11 @@ export class ObservableIntake<T> {
|
|||||||
this.completed = this.completedDeffered.promise;
|
this.completed = this.completedDeffered.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
setObservable(observableFunc) {
|
public setObservable(observableFunc) {
|
||||||
this.observable = observableFunc();
|
this.observable = observableFunc();
|
||||||
}
|
}
|
||||||
|
|
||||||
push(payloadArg: T) {
|
public push(payloadArg: T) {
|
||||||
if (this.buffered) {
|
if (this.buffered) {
|
||||||
this.payloadBuffer.push(payloadArg);
|
this.payloadBuffer.push(payloadArg);
|
||||||
} else {
|
} else {
|
||||||
@ -51,8 +51,8 @@ export class ObservableIntake<T> {
|
|||||||
* pushes many payloads as array
|
* pushes many payloads as array
|
||||||
* @param payloadArgArray
|
* @param payloadArgArray
|
||||||
*/
|
*/
|
||||||
pushMany(payloadArgArray: T[]) {
|
public pushMany(payloadArgArray: T[]) {
|
||||||
for (let item of payloadArgArray) {
|
for (const item of payloadArgArray) {
|
||||||
this.push(item);
|
this.push(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -61,15 +61,15 @@ export class ObservableIntake<T> {
|
|||||||
* sets a generator to query the next pushed value
|
* sets a generator to query the next pushed value
|
||||||
* @param generatorArg
|
* @param generatorArg
|
||||||
*/
|
*/
|
||||||
setGenerator(generatorArg) {
|
public setGenerator(generatorArg) {
|
||||||
this.generator = generatorArg;
|
this.generator = generatorArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
makeBuffered() {
|
public makeBuffered() {
|
||||||
this.buffered = true;
|
this.buffered = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
subscribe(...args) {
|
public subscribe(...args) {
|
||||||
return this.observable.subscribe(...args);
|
return this.observable.subscribe(...args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ export class ObservableIntake<T> {
|
|||||||
* request the next values in the quantity specified
|
* request the next values in the quantity specified
|
||||||
* @param howManyArg if a generator is set, of a buffer exists, this allows retrieving values
|
* @param howManyArg if a generator is set, of a buffer exists, this allows retrieving values
|
||||||
*/
|
*/
|
||||||
request(howManyArg: number) {
|
public request(howManyArg: number) {
|
||||||
if (howManyArg === 0) {
|
if (howManyArg === 0) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
@ -95,7 +95,7 @@ export class ObservableIntake<T> {
|
|||||||
/**
|
/**
|
||||||
* signals the completion of this observable
|
* signals the completion of this observable
|
||||||
*/
|
*/
|
||||||
signalComplete() {
|
public signalComplete() {
|
||||||
this.observableFunctions.complete();
|
this.observableFunctions.complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as events from 'events';
|
import * as events from 'events';
|
||||||
import * as lik from '@pushrocks/lik';
|
import * as lik from '@pushrocks/lik';
|
||||||
import * as rxjs from 'rxjs';
|
import * as rxjs from 'rxjs';
|
||||||
import * as smartevent from 'smartevent';
|
import * as smartevent from '@pushrocks/smartevent';
|
||||||
import * as smartpromise from '@pushrocks/smartpromise';
|
import * as smartpromise from '@pushrocks/smartpromise';
|
||||||
|
|
||||||
export { events, lik, rxjs, smartevent, smartpromise };
|
export { events, lik, rxjs, smartevent, smartpromise };
|
||||||
|
16
tslint.json
16
tslint.json
@ -1,3 +1,17 @@
|
|||||||
{
|
{
|
||||||
"extends": "tslint-config-standard"
|
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||||
|
"rules": {
|
||||||
|
"semicolon": [true, "always"],
|
||||||
|
"no-console": false,
|
||||||
|
"ordered-imports": false,
|
||||||
|
"object-literal-sort-keys": false,
|
||||||
|
"member-ordering": {
|
||||||
|
"options":{
|
||||||
|
"order": [
|
||||||
|
"static-method"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"defaultSeverity": "warning"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user