Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
1274840d17 | |||
d2ce1094de | |||
6b3fcff971 | |||
011a865271 | |||
78914e54b3 | |||
281cfdc38a | |||
217252de1e | |||
ab7f7230ef | |||
7f03ae5248 | |||
0060ec2971 | |||
eec89a596a | |||
d34a91d283 | |||
db14306bcf |
3
dist/index.d.ts
vendored
3
dist/index.d.ts
vendored
@ -1,3 +1,4 @@
|
|||||||
export * from './lik.stringmap';
|
export * from './lik.looptracker';
|
||||||
export * from './lik.objectmap';
|
export * from './lik.objectmap';
|
||||||
export * from './lik.observablemap';
|
export * from './lik.observablemap';
|
||||||
|
export * from './lik.stringmap';
|
||||||
|
5
dist/index.js
vendored
5
dist/index.js
vendored
@ -4,7 +4,8 @@ function __export(m) {
|
|||||||
}
|
}
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
// import modules
|
// import modules
|
||||||
__export(require("./lik.stringmap"));
|
__export(require("./lik.looptracker"));
|
||||||
__export(require("./lik.objectmap"));
|
__export(require("./lik.objectmap"));
|
||||||
__export(require("./lik.observablemap"));
|
__export(require("./lik.observablemap"));
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUVBLGlCQUFpQjtBQUVqQixxQ0FBK0I7QUFDL0IscUNBQStCO0FBQy9CLHlDQUFtQyJ9
|
__export(require("./lik.stringmap"));
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUVBLGlCQUFpQjtBQUVqQix1Q0FBaUM7QUFDakMscUNBQStCO0FBQy9CLHlDQUFtQztBQUNuQyxxQ0FBK0IifQ==
|
10
dist/lik.looptracker.d.ts
vendored
Normal file
10
dist/lik.looptracker.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { Objectmap } from './lik.objectmap';
|
||||||
|
export declare class LoopTracker<T> {
|
||||||
|
referenceObjectMap: Objectmap<any>;
|
||||||
|
constructor();
|
||||||
|
/**
|
||||||
|
* checks and tracks an object
|
||||||
|
* @param objectArg
|
||||||
|
*/
|
||||||
|
checkAndTrack(objectArg: T): boolean;
|
||||||
|
}
|
18
dist/lik.looptracker.js
vendored
Normal file
18
dist/lik.looptracker.js
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const lik_objectmap_1 = require("./lik.objectmap");
|
||||||
|
class LoopTracker {
|
||||||
|
constructor() {
|
||||||
|
this.referenceObjectMap = new lik_objectmap_1.Objectmap();
|
||||||
|
// nothing here
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* checks and tracks an object
|
||||||
|
* @param objectArg
|
||||||
|
*/
|
||||||
|
checkAndTrack(objectArg) {
|
||||||
|
return this.referenceObjectMap.add(objectArg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.LoopTracker = LoopTracker;
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlrLmxvb3B0cmFja2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbGlrLmxvb3B0cmFja2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBRUEsbURBQTJDO0FBRTNDO0lBRUU7UUFEQSx1QkFBa0IsR0FBRyxJQUFJLHlCQUFTLEVBQU8sQ0FBQTtRQUV2QyxlQUFlO0lBQ2pCLENBQUM7SUFFRDs7O09BR0c7SUFDSCxhQUFhLENBQUUsU0FBWTtRQUN6QixNQUFNLENBQUMsSUFBSSxDQUFDLGtCQUFrQixDQUFDLEdBQUcsQ0FBQyxTQUFTLENBQUMsQ0FBQTtJQUMvQyxDQUFDO0NBQ0Y7QUFiRCxrQ0FhQyJ9
|
6
dist/lik.objectmap.d.ts
vendored
6
dist/lik.objectmap.d.ts
vendored
@ -15,8 +15,10 @@ export declare class Objectmap<T> {
|
|||||||
constructor();
|
constructor();
|
||||||
/**
|
/**
|
||||||
* add object to Objectmap
|
* add object to Objectmap
|
||||||
|
* returns false if the object is already in the map
|
||||||
|
* returns true if the object was added successfully
|
||||||
*/
|
*/
|
||||||
add(objectArg: T): void;
|
add(objectArg: T): boolean;
|
||||||
/**
|
/**
|
||||||
* like .add but adds an whole array of objects
|
* like .add but adds an whole array of objects
|
||||||
*/
|
*/
|
||||||
@ -36,7 +38,7 @@ export declare class Objectmap<T> {
|
|||||||
/**
|
/**
|
||||||
* run function for each item in Objectmap
|
* run function for each item in Objectmap
|
||||||
*/
|
*/
|
||||||
forEach(functionArg: IObjectmapForEachFunction<T>): void;
|
forEach(functionArg: IObjectmapForEachFunction<T>): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* gets an object in the Observablemap and removes it, so it can't be retrieved again
|
* gets an object in the Observablemap and removes it, so it can't be retrieved again
|
||||||
*/
|
*/
|
||||||
|
28
dist/lik.objectmap.js
vendored
28
dist/lik.objectmap.js
vendored
@ -1,4 +1,12 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const plugins = require("./lik.plugins");
|
const plugins = require("./lik.plugins");
|
||||||
/**
|
/**
|
||||||
@ -14,9 +22,19 @@ class Objectmap {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* add object to Objectmap
|
* add object to Objectmap
|
||||||
|
* returns false if the object is already in the map
|
||||||
|
* returns true if the object was added successfully
|
||||||
*/
|
*/
|
||||||
add(objectArg) {
|
add(objectArg) {
|
||||||
this.objectArray.push(objectArg);
|
if (this.checkForObject(objectArg)) {
|
||||||
|
// the object is already in the objectmap
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// the object is not yet in the objectmap
|
||||||
|
this.objectArray.push(objectArg);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* like .add but adds an whole array of objects
|
* like .add but adds an whole array of objects
|
||||||
@ -58,7 +76,11 @@ class Objectmap {
|
|||||||
* run function for each item in Objectmap
|
* run function for each item in Objectmap
|
||||||
*/
|
*/
|
||||||
forEach(functionArg) {
|
forEach(functionArg) {
|
||||||
return this.objectArray.forEach(functionArg);
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
for (let object of this.objectArray) {
|
||||||
|
yield functionArg(object);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* gets an object in the Observablemap and removes it, so it can't be retrieved again
|
* gets an object in the Observablemap and removes it, so it can't be retrieved again
|
||||||
@ -103,4 +125,4 @@ class Objectmap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.Objectmap = Objectmap;
|
exports.Objectmap = Objectmap;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlrLm9iamVjdG1hcC5qcyIsInNvdXJj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dCLENBQUM7UUFDSCxDQUFDO1FBQ0QsSUFBSSxDQUFDLFdBQVcsR0FBRyxnQkFBZ0IsQ0FBQTtJQUNyQyxDQUFDO0lBRUQ7O09BRUc7SUFDSCxJQUFJO1FBQ0YsSUFBSSxDQUFDLFdBQVcsR0FBRyxFQUFFLENBQUE7SUFDdkIsQ0FBQztDQUNGO0FBdEhELDhCQXNIQyJ9
|
7
dist/lik.plugins.d.ts
vendored
7
dist/lik.plugins.d.ts
vendored
@ -4,3 +4,10 @@ export import events = require('events');
|
|||||||
export import lodash = require('lodash');
|
export import lodash = require('lodash');
|
||||||
export import minimatch = require('minimatch');
|
export import minimatch = require('minimatch');
|
||||||
export import rx = require('rxjs/Rx');
|
export import rx = require('rxjs/Rx');
|
||||||
|
import { Operator } from 'rxjs/Operator';
|
||||||
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
declare module 'rxjs/Subject' {
|
||||||
|
interface Subject<T> {
|
||||||
|
lift<R>(operator: Operator<T, R>): Observable<R>;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
2
dist/lik.stringmap.js
vendored
2
dist/lik.stringmap.js
vendored
@ -94,4 +94,4 @@ class Stringmap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.Stringmap = Stringmap;
|
exports.Stringmap = Stringmap;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlrLnN0cmluZ21hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2xpay5zdHJpbmdtYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx5Q0FBd0M7QUFVeEM7SUFHSTtRQUZRLGlCQUFZLEdBQWEsRUFBRSxDQUFBO1FBQzNCLG1DQUE4QixHQUF1QixFQUFFLENBQUE7SUFDaEQsQ0FBQztJQUNoQjs7T0FFRztJQUNILFNBQVMsQ0FBQyxTQUFpQjtRQUN2QixJQUFJLENB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}
|
}
|
15
package.json
15
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lik",
|
"name": "lik",
|
||||||
"version": "1.0.32",
|
"version": "1.0.39",
|
||||||
"description": "light little helpers for node",
|
"description": "light little helpers for node",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
@ -17,17 +17,18 @@
|
|||||||
"url": "https://gitlab.com/pushrocks/lik/issues"
|
"url": "https://gitlab.com/pushrocks/lik/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/pushrocks/lik#README",
|
"homepage": "https://gitlab.com/pushrocks/lik#README",
|
||||||
"devDependencies": {},
|
"devDependencies": {
|
||||||
|
"tapbundle": "^1.0.14"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/lodash": "^4.14.62",
|
"@types/lodash": "^4.14.67",
|
||||||
"@types/minimatch": "2.x.x",
|
"@types/minimatch": "2.x.x",
|
||||||
"@types/q": "1.x.x",
|
"@types/q": "1.x.x",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"minimatch": "^3.0.3",
|
"minimatch": "^3.0.4",
|
||||||
"q": "^1.5.0",
|
"q": "^1.5.0",
|
||||||
"rxjs": "^5.3.0",
|
"rxjs": "^5.4.1",
|
||||||
"smartq": "^1.1.1",
|
"smartq": "^1.1.1",
|
||||||
"tapbundle": "^1.0.14",
|
"typings-global": "^1.0.19"
|
||||||
"typings-global": "^1.0.14"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
27
test/test.looptracker.ts
Normal file
27
test/test.looptracker.ts
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
// import test framework
|
||||||
|
import { expect, tap } from 'tapbundle'
|
||||||
|
import * as events from 'events'
|
||||||
|
import * as rx from 'rxjs/Rx'
|
||||||
|
import * as smartq from 'smartq'
|
||||||
|
|
||||||
|
// import the module
|
||||||
|
import lik = require('../ts/index')
|
||||||
|
|
||||||
|
let object1 = {}
|
||||||
|
let object2 = {}
|
||||||
|
let myLoopTracker: lik.LoopTracker<any>
|
||||||
|
|
||||||
|
// tests
|
||||||
|
tap.test('should create a valid looptracker instance', async () => {
|
||||||
|
myLoopTracker = new lik.LoopTracker()
|
||||||
|
expect(myLoopTracker).to.be.instanceof(lik.LoopTracker)
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('should add objects once and return true', async () => {
|
||||||
|
expect(myLoopTracker.checkAndTrack(object1)).to.be.true
|
||||||
|
expect(myLoopTracker.checkAndTrack(object1)).to.be.false
|
||||||
|
expect(myLoopTracker.checkAndTrack(object2)).to.be.true
|
||||||
|
expect(myLoopTracker.checkAndTrack(object2)).to.be.false
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.start()
|
77
test/test.objectmap.ts
Normal file
77
test/test.objectmap.ts
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
// import test framework
|
||||||
|
import { expect, tap } from 'tapbundle'
|
||||||
|
import * as events from 'events'
|
||||||
|
import * as rx from 'rxjs/Rx'
|
||||||
|
import * as smartq from 'smartq'
|
||||||
|
|
||||||
|
// import the module
|
||||||
|
import lik = require('../ts/index')
|
||||||
|
|
||||||
|
// Objectmap
|
||||||
|
interface ITestObject {
|
||||||
|
propOne: string
|
||||||
|
propTwo: string
|
||||||
|
}
|
||||||
|
let testObjectmap: lik.Objectmap<ITestObject>
|
||||||
|
let testObject1: ITestObject = {
|
||||||
|
propOne: 'hello',
|
||||||
|
propTwo: 'hello2'
|
||||||
|
}
|
||||||
|
let testObject2: ITestObject = {
|
||||||
|
propOne: 'hello',
|
||||||
|
propTwo: 'hello2'
|
||||||
|
}
|
||||||
|
|
||||||
|
tap.test('new lik.Objectmap() -> should correctly instantiate an Objectmap', async () => {
|
||||||
|
testObjectmap = new lik.Objectmap<ITestObject>()
|
||||||
|
expect(testObjectmap).be.instanceof(lik.Objectmap)
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('lik.Objectmap.add() -> should correctly add an object to Objectmap', async () => {
|
||||||
|
testObjectmap.add(testObject1)
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(testObjectmap.checkForObject(testObject1)).be.true
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(testObjectmap.checkForObject(testObject2)).be.false
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('lik.Objectmap.remove() -> should correctly remove an object to Objectmap', async () => {
|
||||||
|
testObjectmap.add(testObject2)
|
||||||
|
testObjectmap.remove(testObject1)
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(testObjectmap.checkForObject(testObject1)).be.false
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(testObjectmap.checkForObject(testObject2)).be.true
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('Objectmap.forEach -> should correctly run a function forEach map object', async () => {
|
||||||
|
testObjectmap.forEach(itemArg => {
|
||||||
|
expect(itemArg).have.ownProperty('propOne')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('lik.Objectmap.find() -> should correctly find an object', async () => {
|
||||||
|
let myObject = { propOne: 'helloThere', propTwo: 'helloAnyway' }
|
||||||
|
testObjectmap.add(myObject)
|
||||||
|
let referenceObject = testObjectmap.find((itemArg) => { return (itemArg.propOne === 'helloThere') })
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(myObject === referenceObject).be.true
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('lik.Objectmap.getArray() -> should return a cloned array', async () => {
|
||||||
|
let myObject = { propOne: 'test1', propTwo: 'wow, how awesome' }
|
||||||
|
testObjectmap.add(myObject)
|
||||||
|
let clonedArray = testObjectmap.getArray()
|
||||||
|
expect(clonedArray[ clonedArray.length - 1 ]).eql(myObject)
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('should get one object and then remove it', async () => {
|
||||||
|
let originalLength = testObjectmap.getArray().length
|
||||||
|
let oneObject = testObjectmap.getOneAndRemove()
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(oneObject).not.be.null
|
||||||
|
expect(testObjectmap.getArray().length).equal(originalLength - 1)
|
||||||
|
expect(testObjectmap.getArray()).to.not.contain(oneObject)
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.start()
|
38
test/test.observablemap.ts
Normal file
38
test/test.observablemap.ts
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
// import test framework
|
||||||
|
import { expect, tap } from 'tapbundle'
|
||||||
|
import * as events from 'events'
|
||||||
|
import * as rx from 'rxjs/Rx'
|
||||||
|
import * as smartq from 'smartq'
|
||||||
|
|
||||||
|
// import the module
|
||||||
|
import lik = require('../ts/index')
|
||||||
|
|
||||||
|
let testObservablemap: lik.Observablemap
|
||||||
|
let testObservable1: rx.Observable<any>
|
||||||
|
let testObservable2: rx.Observable<any>
|
||||||
|
let testObservable3: rx.Observable<any>
|
||||||
|
let testEmitter: events.EventEmitter
|
||||||
|
|
||||||
|
tap.test('should create an instance', async () => {
|
||||||
|
testObservablemap = new lik.Observablemap()
|
||||||
|
expect(testObservablemap).be.instanceof(lik.Observablemap)
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('should accept a new emitter', async () => {
|
||||||
|
let done = smartq.defer()
|
||||||
|
testEmitter = new events.EventEmitter()
|
||||||
|
testObservable1 = testObservablemap.getObservableForEmitterEvent(testEmitter, 'event1')
|
||||||
|
testObservable1.subscribe(x => {
|
||||||
|
done.resolve()
|
||||||
|
})
|
||||||
|
testObservable2 = testObservablemap.getObservableForEmitterEvent(testEmitter, 'event1')
|
||||||
|
testObservable3 = testObservablemap.getObservableForEmitterEvent(testEmitter, 'event2')
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(testObservable1 === testObservable2).be.true
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(testObservable1 === testObservable3).be.false
|
||||||
|
testEmitter.emit('event1')
|
||||||
|
await done.promise
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.start()
|
79
test/test.stringmap.ts
Normal file
79
test/test.stringmap.ts
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
// import test framework
|
||||||
|
import { expect, tap } from 'tapbundle'
|
||||||
|
import * as events from 'events'
|
||||||
|
import * as rx from 'rxjs/Rx'
|
||||||
|
import * as smartq from 'smartq'
|
||||||
|
|
||||||
|
// import the module
|
||||||
|
import lik = require('../ts/index')
|
||||||
|
|
||||||
|
// testData
|
||||||
|
let testStringmap: lik.Stringmap
|
||||||
|
let testString1 = 'testString1'
|
||||||
|
let testString2 = 'testString2'
|
||||||
|
let testString3 = 'testString3'
|
||||||
|
let testString4 = 'testString4'
|
||||||
|
let testString5 = 'testString5'
|
||||||
|
let testString6 = 'testString6'
|
||||||
|
|
||||||
|
// tests
|
||||||
|
tap.test('new lik.Objectmap() -> should create an instance of Stringmap', async () => {
|
||||||
|
testStringmap = new lik.Stringmap()
|
||||||
|
expect(testStringmap).be.instanceof(lik.Stringmap)
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('lik.Stringmap.checkString -> should return false for an string not in Stringmap', async () => {
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(testStringmap.checkString(testString1)).be.false
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('lik.Stringmap.addString -> should add an string to Stringmap', async () => {
|
||||||
|
testStringmap.addString(testString1)
|
||||||
|
testStringmap.addString(testString2)
|
||||||
|
testStringmap.addString(testString3)
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(testStringmap.checkString(testString1)).be.true
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(testStringmap.checkString(testString2)).be.true
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(testStringmap.checkString(testString3)).be.true
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(testStringmap.checkMinimatch('*String1')).be.true
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(testStringmap.checkMinimatch('*String2')).be.true
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(testStringmap.checkMinimatch('*String4')).be.false
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('lik.Stringmap.addStringArray -> should add an array of strings', async () => {
|
||||||
|
testStringmap.addStringArray([ testString4, testString5, testString6 ])
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(testStringmap.checkMinimatch('*String4')).be.true
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('lik.Stringmap.removeString -> should remove a string from Stringmap', async () => {
|
||||||
|
testStringmap.removeString(testString2)
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(testStringmap.checkString(testString2)).be.false
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('lik.Stringmap.getStringArray() -> should return a copy of stringArray', async () => {
|
||||||
|
let clonedArray = testStringmap.getStringArray()
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(clonedArray[ 0 ] === 'testString1').be.true
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(clonedArray[ 0 ] === testString1).be.true
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('lik.Stringmap.checkIsEmpty() -> should register a function to trigger when empty', async () => {
|
||||||
|
testStringmap.registerUntilTrue(
|
||||||
|
() => { return testStringmap.checkIsEmpty() },
|
||||||
|
() => { console.log('Stringmap now is empty') }
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('lik.Stringmap.empty() -> should remove wipe and then notify', async () => {
|
||||||
|
testStringmap.wipe()
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.start()
|
151
test/test.ts
151
test/test.ts
@ -1,151 +0,0 @@
|
|||||||
import { expect, tap } from 'tapbundle'
|
|
||||||
import * as events from 'events'
|
|
||||||
import * as rx from 'rxjs/Rx'
|
|
||||||
import * as smartq from 'smartq'
|
|
||||||
|
|
||||||
import lik = require('../dist/index')
|
|
||||||
let testStringmap: lik.Stringmap
|
|
||||||
let testString1 = 'testString1'
|
|
||||||
let testString2 = 'testString2'
|
|
||||||
let testString3 = 'testString3'
|
|
||||||
let testString4 = 'testString4'
|
|
||||||
let testString5 = 'testString5'
|
|
||||||
let testString6 = 'testString6'
|
|
||||||
tap.test('new lik.Objectmap() -> should create an instance of Stringmap', async () => {
|
|
||||||
testStringmap = new lik.Stringmap()
|
|
||||||
expect(testStringmap).be.instanceof(lik.Stringmap)
|
|
||||||
})
|
|
||||||
tap.test('lik.Stringmap.checkString -> should return false for an string not in Stringmap', async () => {
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(testStringmap.checkString(testString1)).be.false
|
|
||||||
})
|
|
||||||
tap.test('lik.Stringmap.addString -> should add an string to Stringmap', async () => {
|
|
||||||
testStringmap.addString(testString1)
|
|
||||||
testStringmap.addString(testString2)
|
|
||||||
testStringmap.addString(testString3)
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(testStringmap.checkString(testString1)).be.true
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(testStringmap.checkString(testString2)).be.true
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(testStringmap.checkString(testString3)).be.true
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(testStringmap.checkMinimatch('*String1')).be.true
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(testStringmap.checkMinimatch('*String2')).be.true
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(testStringmap.checkMinimatch('*String4')).be.false
|
|
||||||
})
|
|
||||||
tap.test('lik.Stringmap.addStringArray -> should add an array of strings', async () => {
|
|
||||||
testStringmap.addStringArray([ testString4, testString5, testString6 ])
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(testStringmap.checkMinimatch('*String4')).be.true
|
|
||||||
})
|
|
||||||
tap.test('lik.Stringmap.removeString -> should remove a string from Stringmap', async () => {
|
|
||||||
testStringmap.removeString(testString2)
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(testStringmap.checkString(testString2)).be.false
|
|
||||||
})
|
|
||||||
tap.test('lik.Stringmap.getStringArray() -> should return a copy of stringArray', async () => {
|
|
||||||
let clonedArray = testStringmap.getStringArray()
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(clonedArray[ 0 ] === 'testString1').be.true
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(clonedArray[ 0 ] === testString1).be.true
|
|
||||||
})
|
|
||||||
tap.test('lik.Stringmap.checkIsEmpty() -> should register a function to trigger when empty', async () => {
|
|
||||||
testStringmap.registerUntilTrue(
|
|
||||||
() => { return testStringmap.checkIsEmpty() },
|
|
||||||
() => { console.log('Stringmap now is empty') }
|
|
||||||
)
|
|
||||||
})
|
|
||||||
tap.test('lik.Stringmap.empty() -> should remove wipe and then notify', async () => {
|
|
||||||
testStringmap.wipe()
|
|
||||||
})
|
|
||||||
|
|
||||||
// Objectmap
|
|
||||||
interface ITestObject {
|
|
||||||
propOne: string
|
|
||||||
propTwo: string
|
|
||||||
}
|
|
||||||
let testObjectmap: lik.Objectmap<ITestObject>
|
|
||||||
let testObject1: ITestObject = {
|
|
||||||
propOne: 'hello',
|
|
||||||
propTwo: 'hello2'
|
|
||||||
}
|
|
||||||
let testObject2: ITestObject = {
|
|
||||||
propOne: 'hello',
|
|
||||||
propTwo: 'hello2'
|
|
||||||
}
|
|
||||||
tap.test('new lik.Objectmap() -> should correctly instantiate an Objectmap', async () => {
|
|
||||||
testObjectmap = new lik.Objectmap<ITestObject>()
|
|
||||||
expect(testObjectmap).be.instanceof(lik.Objectmap)
|
|
||||||
})
|
|
||||||
tap.test('lik.Objectmap.add() -> should correctly add an object to Objectmap', async () => {
|
|
||||||
testObjectmap.add(testObject1)
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(testObjectmap.checkForObject(testObject1)).be.true
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(testObjectmap.checkForObject(testObject2)).be.false
|
|
||||||
})
|
|
||||||
tap.test('lik.Objectmap.remove() -> should correctly remove an object to Objectmap', async () => {
|
|
||||||
testObjectmap.add(testObject2)
|
|
||||||
testObjectmap.remove(testObject1)
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(testObjectmap.checkForObject(testObject1)).be.false
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(testObjectmap.checkForObject(testObject2)).be.true
|
|
||||||
})
|
|
||||||
tap.test('Objectmap.forEach -> should correctly run a function forEach map object', async () => {
|
|
||||||
testObjectmap.forEach(itemArg => {
|
|
||||||
expect(itemArg).have.ownProperty('propOne')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
tap.test('lik.Objectmap.find() -> should correctly find an object', async () => {
|
|
||||||
let myObject = { propOne: 'helloThere', propTwo: 'helloAnyway' }
|
|
||||||
testObjectmap.add(myObject)
|
|
||||||
let referenceObject = testObjectmap.find((itemArg) => { return (itemArg.propOne === 'helloThere') })
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(myObject === referenceObject).be.true
|
|
||||||
})
|
|
||||||
tap.test('lik.Objectmap.getArray() -> should return a cloned array', async () => {
|
|
||||||
let myObject = { propOne: 'test1', propTwo: 'wow, how awesome' }
|
|
||||||
testObjectmap.add(myObject)
|
|
||||||
let clonedArray = testObjectmap.getArray()
|
|
||||||
expect(clonedArray[ clonedArray.length - 1 ]).eql(myObject)
|
|
||||||
})
|
|
||||||
tap.test('should get one object and then remove it', async () => {
|
|
||||||
let originalLength = testObjectmap.getArray().length
|
|
||||||
let oneObject = testObjectmap.getOneAndRemove()
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(oneObject).not.be.null
|
|
||||||
expect(testObjectmap.getArray().length).equal(originalLength - 1)
|
|
||||||
expect(testObjectmap.getArray()).to.not.contain(oneObject)
|
|
||||||
})
|
|
||||||
let testObservablemap: lik.Observablemap
|
|
||||||
let testObservable1: rx.Observable<any>
|
|
||||||
let testObservable2: rx.Observable<any>
|
|
||||||
let testObservable3: rx.Observable<any>
|
|
||||||
let testEmitter: events.EventEmitter
|
|
||||||
tap.test('should create an instance', async () => {
|
|
||||||
testObservablemap = new lik.Observablemap()
|
|
||||||
expect(testObservablemap).be.instanceof(lik.Observablemap)
|
|
||||||
})
|
|
||||||
tap.test('should accept a new emitter', async () => {
|
|
||||||
let done = smartq.defer()
|
|
||||||
testEmitter = new events.EventEmitter()
|
|
||||||
testObservable1 = testObservablemap.getObservableForEmitterEvent(testEmitter, 'event1')
|
|
||||||
testObservable1.subscribe(x => {
|
|
||||||
done.resolve()
|
|
||||||
})
|
|
||||||
testObservable2 = testObservablemap.getObservableForEmitterEvent(testEmitter, 'event1')
|
|
||||||
testObservable3 = testObservablemap.getObservableForEmitterEvent(testEmitter, 'event2')
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(testObservable1 === testObservable2).be.true
|
|
||||||
// tslint:disable-next-line:no-unused-expression
|
|
||||||
expect(testObservable1 === testObservable3).be.false
|
|
||||||
testEmitter.emit('event1')
|
|
||||||
await done.promise
|
|
||||||
})
|
|
||||||
|
|
||||||
tap.start()
|
|
@ -2,6 +2,7 @@ import * as plugins from './lik.plugins'
|
|||||||
|
|
||||||
// import modules
|
// import modules
|
||||||
|
|
||||||
export * from './lik.stringmap'
|
export * from './lik.looptracker'
|
||||||
export * from './lik.objectmap'
|
export * from './lik.objectmap'
|
||||||
export * from './lik.observablemap'
|
export * from './lik.observablemap'
|
||||||
|
export * from './lik.stringmap'
|
||||||
|
18
ts/lik.looptracker.ts
Normal file
18
ts/lik.looptracker.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import * as plugins from './lik.plugins'
|
||||||
|
|
||||||
|
import { Objectmap } from './lik.objectmap'
|
||||||
|
|
||||||
|
export class LoopTracker<T> {
|
||||||
|
referenceObjectMap = new Objectmap<any>()
|
||||||
|
constructor () {
|
||||||
|
// nothing here
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* checks and tracks an object
|
||||||
|
* @param objectArg
|
||||||
|
*/
|
||||||
|
checkAndTrack (objectArg: T) {
|
||||||
|
return this.referenceObjectMap.add(objectArg)
|
||||||
|
}
|
||||||
|
}
|
@ -23,9 +23,18 @@ export class Objectmap<T> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* add object to Objectmap
|
* add object to Objectmap
|
||||||
|
* returns false if the object is already in the map
|
||||||
|
* returns true if the object was added successfully
|
||||||
*/
|
*/
|
||||||
add (objectArg: T) {
|
add (objectArg: T): boolean {
|
||||||
this.objectArray.push(objectArg)
|
if (this.checkForObject(objectArg)) {
|
||||||
|
// the object is already in the objectmap
|
||||||
|
return false
|
||||||
|
} else {
|
||||||
|
// the object is not yet in the objectmap
|
||||||
|
this.objectArray.push(objectArg)
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -70,8 +79,10 @@ export class Objectmap<T> {
|
|||||||
/**
|
/**
|
||||||
* run function for each item in Objectmap
|
* run function for each item in Objectmap
|
||||||
*/
|
*/
|
||||||
forEach (functionArg: IObjectmapForEachFunction<T>) {
|
async forEach (functionArg: IObjectmapForEachFunction<T>) {
|
||||||
return this.objectArray.forEach(functionArg)
|
for (let object of this.objectArray) {
|
||||||
|
await functionArg(object)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,3 +4,12 @@ export import events = require('events')
|
|||||||
export import lodash = require('lodash')
|
export import lodash = require('lodash')
|
||||||
export import minimatch = require('minimatch')
|
export import minimatch = require('minimatch')
|
||||||
export import rx = require('rxjs/Rx')
|
export import rx = require('rxjs/Rx')
|
||||||
|
|
||||||
|
// workaround
|
||||||
|
import {Operator} from 'rxjs/Operator'
|
||||||
|
import {Observable} from 'rxjs/Observable'
|
||||||
|
declare module 'rxjs/Subject' {
|
||||||
|
interface Subject<T> {
|
||||||
|
lift<R>(operator: Operator<T, R>): Observable<R>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -5,110 +5,110 @@ import * as plugins from './lik.plugins'
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export interface ITriggerFunction {
|
export interface ITriggerFunction {
|
||||||
(): boolean
|
(): boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Stringmap {
|
export class Stringmap {
|
||||||
private _stringArray: string[] = []
|
private _stringArray: string[] = []
|
||||||
private _triggerUntilTrueFunctionArray: ITriggerFunction[] = []
|
private _triggerUntilTrueFunctionArray: ITriggerFunction[] = []
|
||||||
constructor() {}
|
constructor() { }
|
||||||
/**
|
/**
|
||||||
* add a string to the Stringmap
|
* add a string to the Stringmap
|
||||||
*/
|
*/
|
||||||
addString(stringArg: string) {
|
addString (stringArg: string) {
|
||||||
this._stringArray.push(stringArg)
|
this._stringArray.push(stringArg)
|
||||||
this.notifyTrigger()
|
this.notifyTrigger()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* like addString, but accepts an array of strings
|
* like addString, but accepts an array of strings
|
||||||
*/
|
*/
|
||||||
addStringArray(stringArrayArg: string[]) {
|
addStringArray (stringArrayArg: string[]) {
|
||||||
for (let stringItem of stringArrayArg){
|
for (let stringItem of stringArrayArg) {
|
||||||
this.addString(stringItem)
|
this.addString(stringItem)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* removes a string from Stringmap
|
||||||
|
*/
|
||||||
|
removeString (stringArg: string) {
|
||||||
|
for (let keyArg in this._stringArray) {
|
||||||
|
if (this._stringArray[ keyArg ] === stringArg) {
|
||||||
|
this._stringArray.splice(parseInt(keyArg), 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.notifyTrigger()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wipes the Stringmap
|
||||||
|
*/
|
||||||
|
wipe () {
|
||||||
|
this._stringArray = []
|
||||||
|
this.notifyTrigger()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check if string is in Stringmap
|
||||||
|
*/
|
||||||
|
checkString (stringArg: string): boolean {
|
||||||
|
return this._stringArray.indexOf(stringArg) !== -1
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* checks stringPresence with minimatch
|
||||||
|
*/
|
||||||
|
checkMinimatch (miniMatchStringArg: string): boolean {
|
||||||
|
let foundMatch: boolean = false
|
||||||
|
for (let stringItem of this._stringArray) {
|
||||||
|
if (plugins.minimatch(stringItem, miniMatchStringArg)) {
|
||||||
|
foundMatch = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return foundMatch
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* checks if the Stringmap is empty
|
||||||
|
*/
|
||||||
|
checkIsEmpty () {
|
||||||
|
return (this._stringArray.length === 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gets a cloned copy of the current string Array
|
||||||
|
*/
|
||||||
|
getStringArray () {
|
||||||
|
return plugins.lodash.cloneDeep(this._stringArray)
|
||||||
|
}
|
||||||
|
|
||||||
|
// trigger registering
|
||||||
|
|
||||||
|
/**
|
||||||
|
* register a new trigger
|
||||||
|
*/
|
||||||
|
registerUntilTrue (functionArg: ITriggerFunction, doFunctionArg) {
|
||||||
|
this._triggerUntilTrueFunctionArray.push(
|
||||||
|
() => {
|
||||||
|
let result = functionArg()
|
||||||
|
if (result === true) {
|
||||||
|
doFunctionArg()
|
||||||
}
|
}
|
||||||
}
|
return result
|
||||||
|
}
|
||||||
|
)
|
||||||
|
this.notifyTrigger()
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* removes a string from Stringmap
|
* notifies triggers
|
||||||
*/
|
*/
|
||||||
removeString(stringArg: string) {
|
private notifyTrigger () {
|
||||||
for (let keyArg in this._stringArray) {
|
let filteredArray = this._triggerUntilTrueFunctionArray.filter((functionArg) => {
|
||||||
if (this._stringArray[keyArg] === stringArg) {
|
return !functionArg()
|
||||||
this._stringArray.splice(parseInt(keyArg),1)
|
})
|
||||||
}
|
this._triggerUntilTrueFunctionArray = filteredArray
|
||||||
}
|
}
|
||||||
this.notifyTrigger()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wipes the Stringmap
|
|
||||||
*/
|
|
||||||
wipe() {
|
|
||||||
this._stringArray = []
|
|
||||||
this.notifyTrigger()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* check if string is in Stringmap
|
|
||||||
*/
|
|
||||||
checkString(stringArg: string): boolean {
|
|
||||||
return this._stringArray.indexOf(stringArg) !== -1
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* checks stringPresence with minimatch
|
|
||||||
*/
|
|
||||||
checkMinimatch(miniMatchStringArg: string): boolean {
|
|
||||||
let foundMatch: boolean = false
|
|
||||||
for (let stringItem of this._stringArray){
|
|
||||||
if (plugins.minimatch(stringItem,miniMatchStringArg)) {
|
|
||||||
foundMatch = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return foundMatch
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* checks if the Stringmap is empty
|
|
||||||
*/
|
|
||||||
checkIsEmpty() {
|
|
||||||
return (this._stringArray.length === 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gets a cloned copy of the current string Array
|
|
||||||
*/
|
|
||||||
getStringArray() {
|
|
||||||
return plugins.lodash.cloneDeep(this._stringArray)
|
|
||||||
}
|
|
||||||
|
|
||||||
// trigger registering
|
|
||||||
|
|
||||||
/**
|
|
||||||
* register a new trigger
|
|
||||||
*/
|
|
||||||
registerUntilTrue(functionArg: ITriggerFunction,doFunctionArg) {
|
|
||||||
this._triggerUntilTrueFunctionArray.push(
|
|
||||||
() => {
|
|
||||||
let result = functionArg()
|
|
||||||
if (result === true) {
|
|
||||||
doFunctionArg()
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
)
|
|
||||||
this.notifyTrigger()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* notifies triggers
|
|
||||||
*/
|
|
||||||
private notifyTrigger() {
|
|
||||||
let filteredArray = this._triggerUntilTrueFunctionArray.filter((functionArg) => {
|
|
||||||
return !functionArg()
|
|
||||||
})
|
|
||||||
this._triggerUntilTrueFunctionArray = filteredArray
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
107
yarn.lock
107
yarn.lock
@ -15,33 +15,37 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/chai" "*"
|
"@types/chai" "*"
|
||||||
|
|
||||||
"@types/chai@*", "@types/chai@^3.4.35":
|
"@types/chai@*":
|
||||||
|
version "4.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.0.1.tgz#37fea779617cfec3fd2b19a0247e8bbdd5133bf6"
|
||||||
|
|
||||||
|
"@types/chai@^3.4.35":
|
||||||
version "3.5.2"
|
version "3.5.2"
|
||||||
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.5.2.tgz#c11cd2817d3a401b7ba0f5a420f35c56139b1c1e"
|
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.5.2.tgz#c11cd2817d3a401b7ba0f5a420f35c56139b1c1e"
|
||||||
|
|
||||||
"@types/lodash@^4.14.62":
|
"@types/lodash@^4.14.67":
|
||||||
version "4.14.62"
|
version "4.14.67"
|
||||||
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.62.tgz#8674f9861582148a60b7a89cb260f11378d11683"
|
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.67.tgz#4714714434da110306b9862fbd36b30b55eb850a"
|
||||||
|
|
||||||
"@types/minimatch@2.x.x":
|
"@types/minimatch@2.x.x":
|
||||||
version "2.0.29"
|
version "2.0.29"
|
||||||
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a"
|
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a"
|
||||||
|
|
||||||
"@types/node@*", "@types/node@^7.0.29":
|
"@types/node@*":
|
||||||
version "7.0.31"
|
version "8.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.31.tgz#80ea4d175599b2a00149c29a10a4eb2dff592e86"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.6.tgz#ed2c3e011cb51ccd3cf874989130f1b9ffe06069"
|
||||||
|
|
||||||
"@types/promises-a-plus@*":
|
"@types/promises-a-plus@*":
|
||||||
version "0.0.27"
|
version "0.0.27"
|
||||||
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
|
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
|
||||||
|
|
||||||
"@types/q@1.x.x":
|
"@types/q@1.x.x":
|
||||||
version "1.0.0"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.0.0.tgz#57e5465d665b370d4217e69b344b20faa6b724f5"
|
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.0.1.tgz#dbccb01bd8f0f801a12a4604c7d7af59bb02ae2f"
|
||||||
|
|
||||||
"@types/shelljs@^0.6.0":
|
"@types/shelljs@^0.7.2":
|
||||||
version "0.6.0"
|
version "0.7.2"
|
||||||
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.6.0.tgz#090b705c102ce7fc5c0c5ea9b524418ff15840df"
|
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.2.tgz#c2bdb3fe80cd7a3da08750ca898ae44c589671f3"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
@ -57,9 +61,9 @@ assertion-error@^1.0.1:
|
|||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
|
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
|
||||||
|
|
||||||
balanced-match@^0.4.1:
|
balanced-match@^1.0.0:
|
||||||
version "0.4.2"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
|
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
||||||
|
|
||||||
beautycolor@^1.0.7:
|
beautycolor@^1.0.7:
|
||||||
version "1.0.7"
|
version "1.0.7"
|
||||||
@ -72,11 +76,11 @@ bindings@^1.2.1:
|
|||||||
version "1.2.1"
|
version "1.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11"
|
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11"
|
||||||
|
|
||||||
brace-expansion@^1.0.0:
|
brace-expansion@^1.1.7:
|
||||||
version "1.1.7"
|
version "1.1.8"
|
||||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59"
|
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
|
||||||
dependencies:
|
dependencies:
|
||||||
balanced-match "^0.4.1"
|
balanced-match "^1.0.0"
|
||||||
concat-map "0.0.1"
|
concat-map "0.0.1"
|
||||||
|
|
||||||
chai-as-promised@^6.0.0:
|
chai-as-promised@^6.0.0:
|
||||||
@ -128,13 +132,13 @@ fs.realpath@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||||
|
|
||||||
glob@^7.0.0:
|
glob@^7.0.0:
|
||||||
version "7.1.1"
|
version "7.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
|
||||||
dependencies:
|
dependencies:
|
||||||
fs.realpath "^1.0.0"
|
fs.realpath "^1.0.0"
|
||||||
inflight "^1.0.4"
|
inflight "^1.0.4"
|
||||||
inherits "2"
|
inherits "2"
|
||||||
minimatch "^3.0.2"
|
minimatch "^3.0.4"
|
||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
path-is-absolute "^1.0.0"
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
@ -150,8 +154,8 @@ inherits@2:
|
|||||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||||
|
|
||||||
interpret@^1.0.0:
|
interpret@^1.0.0:
|
||||||
version "1.0.2"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.2.tgz#f4f623f0bb7122f15f5717c8e254b8161b5c5b2d"
|
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
|
||||||
|
|
||||||
isexe@^2.0.0:
|
isexe@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
@ -182,11 +186,11 @@ memwatch-next@^0.3.0:
|
|||||||
bindings "^1.2.1"
|
bindings "^1.2.1"
|
||||||
nan "^2.3.2"
|
nan "^2.3.2"
|
||||||
|
|
||||||
minimatch@^3.0.2, minimatch@^3.0.3:
|
minimatch@^3.0.4:
|
||||||
version "3.0.3"
|
version "3.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
||||||
dependencies:
|
dependencies:
|
||||||
brace-expansion "^1.0.0"
|
brace-expansion "^1.1.7"
|
||||||
|
|
||||||
minimist@^1.2.0:
|
minimist@^1.2.0:
|
||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
@ -225,14 +229,14 @@ rechoir@^0.6.2:
|
|||||||
resolve "^1.1.6"
|
resolve "^1.1.6"
|
||||||
|
|
||||||
resolve@^1.1.6:
|
resolve@^1.1.6:
|
||||||
version "1.3.2"
|
version "1.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.2.tgz#1f0442c9e0cbb8136e87b9305f932f46c7f28235"
|
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5"
|
||||||
dependencies:
|
dependencies:
|
||||||
path-parse "^1.0.5"
|
path-parse "^1.0.5"
|
||||||
|
|
||||||
rxjs@^5.3.0:
|
rxjs@^5.4.1:
|
||||||
version "5.3.0"
|
version "5.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.3.0.tgz#d88ccbdd46af290cbdb97d5d8055e52453fabe2d"
|
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.1.tgz#b62f757f279445d265a18a58fb0a70dc90e91626"
|
||||||
dependencies:
|
dependencies:
|
||||||
symbol-observable "^1.0.1"
|
symbol-observable "^1.0.1"
|
||||||
|
|
||||||
@ -240,9 +244,9 @@ semver@^5.3.0:
|
|||||||
version "5.3.0"
|
version "5.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
|
||||||
|
|
||||||
shelljs@^0.7.4, shelljs@^0.7.6:
|
shelljs@^0.7.8:
|
||||||
version "0.7.7"
|
version "0.7.8"
|
||||||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1"
|
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
|
||||||
dependencies:
|
dependencies:
|
||||||
glob "^7.0.0"
|
glob "^7.0.0"
|
||||||
interpret "^1.0.0"
|
interpret "^1.0.0"
|
||||||
@ -266,7 +270,7 @@ smartdelay@^1.0.3:
|
|||||||
smartq "^1.1.1"
|
smartq "^1.1.1"
|
||||||
typings-global "^1.0.16"
|
typings-global "^1.0.16"
|
||||||
|
|
||||||
smartq@^1.1.0, smartq@^1.1.1:
|
smartq@^1.1.1:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.1.tgz#efb358705260d41ae18aef7ffd815f7b6fe17dd3"
|
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.1.tgz#efb358705260d41ae18aef7ffd815f7b6fe17dd3"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -274,14 +278,15 @@ smartq@^1.1.0, smartq@^1.1.1:
|
|||||||
typings-global "^1.0.14"
|
typings-global "^1.0.14"
|
||||||
|
|
||||||
smartshell@^1.0.6:
|
smartshell@^1.0.6:
|
||||||
version "1.0.6"
|
version "1.0.8"
|
||||||
resolved "https://registry.yarnpkg.com/smartshell/-/smartshell-1.0.6.tgz#27b1c79029784abe72ac7e91fe698b7ebecc6629"
|
resolved "https://registry.yarnpkg.com/smartshell/-/smartshell-1.0.8.tgz#1535756c0fe8069f7e6da1e3f9cb6c8f77094e42"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/shelljs" "^0.6.0"
|
"@types/shelljs" "^0.7.2"
|
||||||
"@types/which" "^1.0.28"
|
"@types/which" "^1.0.28"
|
||||||
shelljs "^0.7.6"
|
shelljs "^0.7.8"
|
||||||
smartq "^1.1.0"
|
smartq "^1.1.1"
|
||||||
which "^1.2.12"
|
typings-global "^1.0.19"
|
||||||
|
which "^1.2.14"
|
||||||
|
|
||||||
symbol-observable@^1.0.1:
|
symbol-observable@^1.0.1:
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
@ -310,22 +315,14 @@ typed-promisify@^0.3.0:
|
|||||||
version "0.3.0"
|
version "0.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/typed-promisify/-/typed-promisify-0.3.0.tgz#1ba0af5e444c87d8047406f18ce49092a1191853"
|
resolved "https://registry.yarnpkg.com/typed-promisify/-/typed-promisify-0.3.0.tgz#1ba0af5e444c87d8047406f18ce49092a1191853"
|
||||||
|
|
||||||
typings-global@^1.0.14:
|
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.19:
|
||||||
version "1.0.14"
|
version "1.0.19"
|
||||||
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.14.tgz#ab682720a03d6b9278869fb5c30c30d7dc61d12c"
|
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.19.tgz#3376a72d4de1e5541bf5702248ff64c3e6ea316c"
|
||||||
dependencies:
|
dependencies:
|
||||||
semver "^5.3.0"
|
|
||||||
shelljs "^0.7.4"
|
|
||||||
|
|
||||||
typings-global@^1.0.16:
|
|
||||||
version "1.0.17"
|
|
||||||
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.17.tgz#41edc331ccec3168289adc8849e1e255efbe7152"
|
|
||||||
dependencies:
|
|
||||||
"@types/node" "^7.0.29"
|
|
||||||
semver "^5.3.0"
|
semver "^5.3.0"
|
||||||
smartshell "^1.0.6"
|
smartshell "^1.0.6"
|
||||||
|
|
||||||
which@^1.2.12:
|
which@^1.2.14:
|
||||||
version "1.2.14"
|
version "1.2.14"
|
||||||
resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5"
|
resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
Reference in New Issue
Block a user