Compare commits

...

31 Commits

Author SHA1 Message Date
a76832bedb 2.0.0 2017-10-26 22:31:21 +02:00
3c229e8e26 remove rxjs and move Observablemap to smartrx 2017-10-26 22:31:14 +02:00
29d6f2d7e0 1.0.43 2017-10-24 13:19:54 +02:00
2b5ff6a4ab remove q dependency 2017-10-24 13:19:52 +02:00
c75437e73f 1.0.42 2017-09-21 23:03:41 +02:00
61e4a62689 update ci 2017-09-21 23:03:36 +02:00
d53f5410cd 1.0.41 2017-09-21 23:01:07 +02:00
53516b1c8f update dependencies 2017-09-21 23:01:03 +02:00
e59205490b add LimitedArray 2017-09-21 22:54:22 +02:00
38884ff59c 1.0.40 2017-08-27 20:18:19 +02:00
861833e930 update docs 2017-08-27 20:18:15 +02:00
1274840d17 1.0.39 2017-08-27 20:01:10 +02:00
d2ce1094de improve objectmap.forEach to support async actions 2017-08-27 20:01:06 +02:00
6b3fcff971 1.0.38 2017-07-05 14:37:30 +02:00
011a865271 improve tests 2017-07-05 14:37:26 +02:00
78914e54b3 1.0.37 2017-07-05 14:29:46 +02:00
281cfdc38a add loop tracker 2017-07-05 14:29:08 +02:00
217252de1e 1.0.36 2017-06-30 18:01:38 +02:00
ab7f7230ef fix rxjs wring typings 2017-06-30 18:01:35 +02:00
7f03ae5248 1.0.35 2017-06-30 17:20:00 +02:00
0060ec2971 update dependencies 2017-06-30 17:19:58 +02:00
eec89a596a 1.0.34 2017-06-30 17:14:59 +02:00
d34a91d283 1.0.33 2017-06-30 17:11:51 +02:00
db14306bcf remove tapbundle from dependencies 2017-06-30 17:11:47 +02:00
cf446f90ee 1.0.32 2017-06-18 13:13:16 +02:00
9c2f3cf678 update typings 2017-06-18 13:13:12 +02:00
18df32ae5a 1.0.31 2017-06-17 14:45:26 +02:00
66b6e78bb1 update ci 2017-06-17 14:45:23 +02:00
408faa97a4 update tests 2017-06-17 14:44:55 +02:00
4a7749be47 1.0.30 2017-04-09 16:40:37 +02:00
570283551f update README 2017-04-09 16:40:34 +02:00
32 changed files with 1007 additions and 710 deletions

View File

@ -7,15 +7,25 @@ cache:
key: "$CI_BUILD_STAGE"
stages:
- mirror
- test
- release
- trigger
- pages
mirror:
stage: mirror
script:
- npmci git mirror
tags:
- docker
testLEGACY:
stage: test
script:
- npmci test legacy
- npmci node install legacy
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
@ -24,7 +34,9 @@ testLEGACY:
testLTS:
stage: test
script:
- npmci test lts
- npmci node install lts
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
@ -32,7 +44,9 @@ testLTS:
testSTABLE:
stage: test
script:
- npmci test stable
- npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
@ -40,7 +54,8 @@ testSTABLE:
release:
stage: release
script:
- npmci publish
- npmci npm prepare
- npmci npm publish
only:
- tags
tags:
@ -60,7 +75,7 @@ pages:
stage: pages
script:
- npmci command yarn global add npmpage
- npmci command npmpage --publish gitlab
- npmci command npmpage
tags:
- docker
only:

View File

@ -2,14 +2,15 @@
light little helpers for node
## Availabililty
[![npm](https://push.rocks/assets/repo-button-npm.svg)](https://www.npmjs.com/package/lik)
[![git](https://push.rocks/assets/repo-button-git.svg)](https://gitlab.com/pushrocks/lik)
[![git](https://push.rocks/assets/repo-button-mirror.svg)](https://github.com/pushrocks/lik)
[![docs](https://push.rocks/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/lik/gitbook)
[![npm](https://pushrocks.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/lik)
[![git](https://pushrocks.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/lik)
[![git](https://pushrocks.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/pushrocks/lik)
[![docs](https://pushrocks.gitlab.io/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/lik/)
## Status for master
[![build status](https://gitlab.com/pushrocks/lik/badges/master/build.svg)](https://gitlab.com/pushrocks/lik/commits/master)
[![coverage report](https://gitlab.com/pushrocks/lik/badges/master/coverage.svg)](https://gitlab.com/pushrocks/lik/commits/master)
[![build status](https://GitLab.com/pushrocks/lik/badges/master/build.svg)](https://GitLab.com/pushrocks/lik/commits/master)
[![coverage report](https://GitLab.com/pushrocks/lik/badges/master/coverage.svg)](https://GitLab.com/pushrocks/lik/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/lik.svg)](https://www.npmjs.com/package/lik)
[![Dependency Status](https://david-dm.org/pushrocks/lik.svg)](https://david-dm.org/pushrocks/lik)
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/lik/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/lik/master/dependencies/npm)
[![bitHound Code](https://www.bithound.io/github/pushrocks/lik/badges/code.svg)](https://www.bithound.io/github/pushrocks/lik)
@ -18,9 +19,9 @@ light little helpers for node
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
## Usage
We recommend the use of TypeScript for good intellisense.
Use TypeScript for best in class instellisense.
```typescript
```javascript
// import any tool that you need from lik
import { Stringmap, Objectmap, Observablemap } from "lik";
```
@ -39,6 +40,9 @@ Observables have a smaller footprint and a more manageable subscribe logic.
Observablemap registers only one rxjs observable per event and then continues to reference
the same observable that you can subscribe to.
**For a detailed class overview, please take a look at the API docs**
For further information read the linked docs at the top of this README.
[![npm](https://push.rocks/assets/repo-header.svg)](https://push.rocks)
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://push.rocks)

5
dist/index.d.ts vendored
View File

@ -1,3 +1,4 @@
export * from './lik.stringmap';
export * from './lik.looptracker';
export * from './lik.objectmap';
export * from './lik.observablemap';
export * from './lik.stringmap';
export * from './lik.limitedarray';

7
dist/index.js vendored
View File

@ -4,7 +4,8 @@ function __export(m) {
}
Object.defineProperty(exports, "__esModule", { value: true });
// import modules
__export(require("./lik.stringmap"));
__export(require("./lik.looptracker"));
__export(require("./lik.objectmap"));
__export(require("./lik.observablemap"));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUVBLGlCQUFpQjtBQUVqQixxQ0FBK0I7QUFDL0IscUNBQStCO0FBQy9CLHlDQUFtQyJ9
__export(require("./lik.stringmap"));
__export(require("./lik.limitedarray"));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUVBLGlCQUFpQjtBQUVqQix1Q0FBaUM7QUFDakMscUNBQStCO0FBQy9CLHFDQUErQjtBQUMvQix3Q0FBa0MifQ==

9
dist/lik.limitedarray.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
export declare class LimitedArray<T> {
array: T[];
arrayLimit: number;
constructor(limitArg: number);
addOne(objectArg: T): void;
addMany(objectArrayArg: T[]): void;
setLimit(limitArg: number): void;
getAverage(): number;
}

40
dist/lik.limitedarray.js vendored Normal file
View File

@ -0,0 +1,40 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class LimitedArray {
constructor(limitArg) {
this.array = [];
this.arrayLimit = limitArg;
}
addOne(objectArg) {
this.array.unshift(objectArg);
if (this.array.length > this.arrayLimit) {
this.array.length = this.arrayLimit;
}
}
addMany(objectArrayArg) {
for (let objectArg of objectArrayArg) {
this.addOne(objectArg);
}
}
setLimit(limitArg) {
this.arrayLimit = limitArg;
if (this.array.length > this.arrayLimit) {
this.array.length = this.arrayLimit;
}
}
getAverage() {
if (typeof this.array[0] === 'number') {
let sum = 0;
for (let localNumber of this.array) {
let localNumberAny = localNumber;
sum = sum + localNumberAny;
}
return sum / this.array.length;
}
else {
return null;
}
}
}
exports.LimitedArray = LimitedArray;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlrLmxpbWl0ZWRhcnJheS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2xpay5saW1pdGVkYXJyYXkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFFQTtJQUdFLFlBQVksUUFBZ0I7UUFGNUIsVUFBSyxHQUFRLEVBQUUsQ0FBQTtRQUdiLElBQUksQ0FBQyxVQUFVLEdBQUcsUUFBUSxDQUFBO0lBQzVCLENBQUM7SUFFRCxNQUFNLENBQUUsU0FBWTtRQUNsQixJQUFJLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQTtRQUM3QixFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLE1BQU0sR0FBRyxJQUFJLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQztZQUN4QyxJQUFJLENBQUMsS0FBSyxDQUFDLE1BQU0sR0FBRyxJQUFJLENBQUMsVUFBVSxDQUFBO1FBQ3JDLENBQUM7SUFDSCxDQUFDO0lBRUQsT0FBTyxDQUFFLGNBQW1CO1FBQzFCLEdBQUcsQ0FBQyxDQUFDLElBQUksU0FBUyxJQUFJLGNBQWMsQ0FBQyxDQUFDLENBQUM7WUFDckMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxTQUFTLENBQUMsQ0FBQTtRQUN4QixDQUFDO0lBQ0gsQ0FBQztJQUVELFFBQVEsQ0FBRSxRQUFnQjtRQUN4QixJQUFJLENBQUMsVUFBVSxHQUFHLFFBQVEsQ0FBQTtRQUMxQixFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLE1BQU0sR0FBRyxJQUFJLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQztZQUN4QyxJQUFJLENBQUMsS0FBSyxDQUFDLE1BQU0sR0FBRyxJQUFJLENBQUMsVUFBVSxDQUFBO1FBQ3JDLENBQUM7SUFDSCxDQUFDO0lBRUQsVUFBVTtRQUNSLEVBQUUsQ0FBQyxDQUFDLE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsS0FBSyxRQUFRLENBQUMsQ0FBQyxDQUFDO1lBQ3RDLElBQUksR0FBRyxHQUFHLENBQUMsQ0FBQTtZQUNYLEdBQUcsQ0FBQyxDQUFDLElBQUksV0FBVyxJQUFJLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDO2dCQUNuQyxJQUFJLGNBQWMsR0FBUSxXQUFXLENBQUE7Z0JBQ3JDLEdBQUcsR0FBRyxHQUFHLEdBQUcsY0FBYyxDQUFBO1lBQzVCLENBQUM7WUFDRCxNQUFNLENBQUMsR0FBRyxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFBO1FBQ2hDLENBQUM7UUFBQyxJQUFJLENBQUMsQ0FBQztZQUNOLE1BQU0sQ0FBQyxJQUFJLENBQUE7UUFDYixDQUFDO0lBQ0gsQ0FBQztDQUVGO0FBeENELG9DQXdDQyJ9

10
dist/lik.looptracker.d.ts vendored Normal file
View 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
View 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

View File

@ -15,8 +15,10 @@ export declare class Objectmap<T> {
constructor();
/**
* 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
*/
@ -32,11 +34,11 @@ export declare class Objectmap<T> {
/**
* finds a specific element and then removes it
*/
findOneAndRemove(findFunction: any): T;
findOneAndRemove(findFunction: IObjectmapFindFunction<T>): T;
/**
* 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
*/

27
dist/lik.objectmap.js vendored
View File

@ -1,4 +1,12 @@
"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 });
const plugins = require("./lik.plugins");
/**
@ -10,12 +18,23 @@ class Objectmap {
*/
constructor() {
this.objectArray = [];
// nothing here
}
/**
* add object to Objectmap
* returns false if the object is already in the map
* returns true if the object was added successfully
*/
add(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
@ -57,7 +76,11 @@ class Objectmap {
* run function for each item in Objectmap
*/
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
@ -102,4 +125,4 @@ class Objectmap {
}
}
exports.Objectmap = Objectmap;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlrLm9iamVjdG1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2xpay5vYmplY3RtYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx5Q0FBd0M7QUFVeEM7O0dBRUc7QUFDSDtJQUdJOztPQUVHO0lBQ0g7UUFMUSxnQkFBVyxHQUFRLEVBQUUsQ0FBQTtJQU83QixDQUFDO0lBRUQ7O09BRUc7SUFDSCxHQUFHLENBQUMsU0FBWTtRQUNaLElBQUksQ0FBQyxXQUFXLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFBO0lBQ3BDLENBQUM7SUFFRDs7T0FFRztJQUNILFFBQVEsQ0FBQyxjQUFtQjtRQUN4QixHQUFHLENBQUMsQ0FBQyxJQUFJLElBQUksSUFBSSxjQUFjLENBQUMsQ0FBQyxDQUFDO1lB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LENBQUMsQ0FBQTtJQUNuRCxDQUFDO0lBRUQ7O09BRUc7SUFDSCxPQUFPO1FBQ0wsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxNQUFNLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztZQUNsQyxNQUFNLENBQUMsSUFBSSxDQUFBO1FBQ2IsQ0FBQztRQUFDLElBQUksQ0FBQyxDQUFDO1lBQ04sTUFBTSxDQUFDLEtBQUssQ0FBQTtRQUNkLENBQUM7SUFDSCxDQUFDO0lBRUQ7O09BRUc7SUFDSCxNQUFNLENBQUUsU0FBWTtRQUNsQixJQUFJLGdCQUFnQixHQUFHLEVBQUUsQ0FBQTtRQUN6QixHQUFHLENBQUMsQ0FBQyxJQUFJLElBQUksSUFBSSxJQUFJLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQztZQUNsQyxFQUFFLENBQUMsQ0FBQyxJQUFJLEtBQUssU0FBUyxDQUFDLENBQUMsQ0FBQztnQkFDdkIsZ0JBQWdCLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFBO1lBQzdCLENBQUM7UUFDSCxDQUFDO1FBQ0QsSUFBSSxDQUFDLFdBQVcsR0FBRyxnQkFBZ0IsQ0FBQTtJQUNyQyxDQUFDO0lBRUQ7O09BRUc7SUFDSCxJQUFJO1FBQ0YsSUFBSSxDQUFDLFdBQVcsR0FBRyxFQUFFLENBQUE7SUFDdkIsQ0FBQztDQUNGO0FBdEhELDhCQXNIQyJ9

View File

@ -1,22 +0,0 @@
import * as plugins from './lik.plugins';
import { Objectmap } from './lik.objectmap';
import { Observable } from 'rxjs/Rx';
/**
* bundles an observable with an emitter
*/
export interface ObservableEmitterBundle {
observable: plugins.rx.Observable<any>;
emitter: plugins.events.EventEmitter;
event: string;
}
/**
* manages observables by making sure that only one observable is regsitered per event
*/
export declare class Observablemap {
ObservableEmitterBundleObjectmap: Objectmap<ObservableEmitterBundle>;
/**
* creates a new observable if not yet registered for the same event.
* In case event has been registered before the same observable is returned.
*/
getObservableForEmitterEvent(emitterArg: plugins.events.EventEmitter, eventArg: string): Observable<any>;
}

View File

@ -1,35 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./lik.plugins");
const lik_objectmap_1 = require("./lik.objectmap");
/**
* manages observables by making sure that only one observable is regsitered per event
*/
class Observablemap {
constructor() {
this.ObservableEmitterBundleObjectmap = new lik_objectmap_1.Objectmap();
}
/**
* creates a new observable if not yet registered for the same event.
* In case event has been registered before the same observable is returned.
*/
getObservableForEmitterEvent(emitterArg, eventArg) {
let existingBundle = this.ObservableEmitterBundleObjectmap.find((bundleArg) => {
return (bundleArg.emitter === emitterArg && bundleArg.event === eventArg);
});
if (existingBundle) {
return existingBundle.observable;
}
else {
let emitterObservable = plugins.rx.Observable.fromEvent(emitterArg, eventArg);
this.ObservableEmitterBundleObjectmap.add({
observable: emitterObservable,
emitter: emitterArg,
event: eventArg
});
return emitterObservable;
}
}
}
exports.Observablemap = Observablemap;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlrLm9ic2VydmFibGVtYXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9saWsub2JzZXJ2YWJsZW1hcC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHlDQUF3QztBQUN4QyxtREFBMkM7QUFjM0M7O0dBRUc7QUFDSDtJQUFBO1FBQ0kscUNBQWdDLEdBQUcsSUFBSSx5QkFBUyxFQUEyQixDQUFBO0lBc0IvRSxDQUFDO0lBcEJHOzs7T0FHRztJQUNILDRCQUE0QixDQUFDLFVBQXVDLEVBQUUsUUFBZ0I7UUFDbEYsSUFBSSxjQUFjLEdBQUcsSUFBSSxDQUFDLGdDQUFnQyxDQUFDLElBQUksQ0FBQyxDQUFDLFNBQVM7WUFDdEUsTUFBTSxDQUFBLENBQUMsU0FBUyxDQUFDLE9BQU8sS0FBSyxVQUFVLElBQUksU0FBUyxDQUFDLEtBQUssS0FBSyxRQUFRLENBQUMsQ0FBQTtRQUM1RSxDQUFDLENBQUMsQ0FBQTtRQUNGLEVBQUUsQ0FBQyxDQUFDLGNBQWMsQ0FBQyxDQUFDLENBQUM7WUFDakIsTUFBTSxDQUFDLGNBQWMsQ0FBQyxVQUFVLENBQUE7UUFDcEMsQ0FBQztRQUFDLElBQUksQ0FBQyxDQUFDO1lBQ0osSUFBSSxpQkFBaUIsR0FBRyxPQUFPLENBQUMsRUFBRSxDQUFDLFVBQVUsQ0FBQyxTQUFTLENBQUMsVUFBVSxFQUFFLFFBQVEsQ0FBQyxDQUFBO1lBQzdFLElBQUksQ0FBQyxnQ0FBZ0MsQ0FBQyxHQUFHLENBQUM7Z0JBQ3RDLFVBQVUsRUFBRSxpQkFBaUI7Z0JBQzdCLE9BQU8sRUFBRSxVQUFVO2dCQUNuQixLQUFLLEVBQUUsUUFBUTthQUNsQixDQUFDLENBQUE7WUFDRixNQUFNLENBQUMsaUJBQWlCLENBQUE7UUFDNUIsQ0FBQztJQUNMLENBQUM7Q0FDSjtBQXZCRCxzQ0F1QkMifQ==

10
dist/lik.plugins.d.ts vendored
View File

@ -1,6 +1,6 @@
import 'typings-global';
export import q = require('q');
export import events = require('events');
export import lodash = require('lodash');
export import minimatch = require('minimatch');
export import rx = require('rxjs/Rx');
import * as smartq from 'smartq';
import * as events from 'events';
import * as lodash from 'lodash';
import * as minimatch from 'minimatch';
export { smartq, events, lodash, minimatch };

15
dist/lik.plugins.js vendored
View File

@ -1,9 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("typings-global");
exports.q = require("q");
exports.events = require("events");
exports.lodash = require("lodash");
exports.minimatch = require("minimatch");
exports.rx = require("rxjs/Rx");
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlrLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9saWsucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2Qix5QkFBOEI7QUFDOUIsbUNBQXdDO0FBQ3hDLG1DQUF3QztBQUN4Qyx5Q0FBOEM7QUFDOUMsZ0NBQXFDIn0=
const smartq = require("smartq");
exports.smartq = smartq;
const events = require("events");
exports.events = events;
const lodash = require("lodash");
exports.lodash = lodash;
const minimatch = require("minimatch");
exports.minimatch = minimatch;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlrLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9saWsucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2QixpQ0FBZ0M7QUFNOUIsd0JBQU07QUFMUixpQ0FBZ0M7QUFNOUIsd0JBQU07QUFMUixpQ0FBZ0M7QUFNOUIsd0JBQU07QUFMUix1Q0FBc0M7QUFNcEMsOEJBQVMifQ==

View File

@ -94,4 +94,4 @@ class Stringmap {
}
}
exports.Stringmap = Stringmap;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlrLnN0cmluZ21hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2xpay5zdHJpbmdtYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx5Q0FBd0M7QUFVeEM7SUFHSTtRQUZRLGlCQUFZLEdBQWEsRUFBRSxDQUFBO1FBQzNCLG1DQUE4QixHQUF1QixFQUFFLENBQUE7SUFDaEQsQ0FBQztJQUNoQjs7T0FFRztJQUNILFNBQVMsQ0FBQyxTQUFpQjtRQUN2QixJQUFJLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQTtRQUNqQyxJQUF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UFFRDs7T0FFRztJQUNILGNBQWM7UUFDWixNQUFNLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxDQUFBO0lBQ3BELENBQUM7SUFFRCxzQkFBc0I7SUFFdEI7O09BRUc7SUFDSCxpQkFBaUIsQ0FBRSxXQUE2QixFQUFFLGFBQWE7UUFDN0QsSUFBSSxDQUFDLDhCQUE4QixDQUFDLElBQUksQ0FDdEMsR0FBRyxFQUFFO1lBQ0gsSUFBSSxNQUFNLEdBQUcsV0FBVyxFQUFFLENBQUE7WUFDMUIsRUFBRSxDQUFDLENBQUMsTUFBTSxLQUFLLElBQUksQ0FBQyxDQUFDLENBQUM7Z0JBQ3BCLGFBQWEsRUFBRSxDQUFBO1lBQ2pCLENBQUM7WUFDRCxNQUFNLENBQUMsTUFBTSxDQUFBO1FBQ2YsQ0FBQyxDQUNGLENBQUE7UUFDRCxJQUFJLENBQUMsYUFBYSxFQUFFLENBQUE7SUFDdEIsQ0FBQztJQUVEOztPQUVHO0lBQ0ssYUFBYTtRQUNuQixJQUFJLGFBQWEsR0FBRyxJQUFJLENBQUMsOEJBQThCLENBQUMsTUFBTSxDQUFDLENBQUMsV0FBVyxFQUFFLEVBQUU7WUFDN0UsTUFBTSxDQUFDLENBQUMsV0FBVyxFQUFFLENBQUE7UUFDdkIsQ0FBQyxDQUFDLENBQUE7UUFDRixJQUFJLENBQUMsOEJBQThCLEdBQUcsYUFBYSxDQUFBO0lBQ3JELENBQUM7Q0FFRjtBQXZHRCw4QkF1R0MifQ==

48
docs/index.md Normal file
View File

@ -0,0 +1,48 @@
# lik
light little helpers for node
## Availabililty
[![npm](https://pushrocks.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/lik)
[![git](https://pushrocks.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/lik)
[![git](https://pushrocks.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/pushrocks/lik)
[![docs](https://pushrocks.gitlab.io/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/lik/)
## Status for master
[![build status](https://GitLab.com/pushrocks/lik/badges/master/build.svg)](https://GitLab.com/pushrocks/lik/commits/master)
[![coverage report](https://GitLab.com/pushrocks/lik/badges/master/coverage.svg)](https://GitLab.com/pushrocks/lik/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/lik.svg)](https://www.npmjs.com/package/lik)
[![Dependency Status](https://david-dm.org/pushrocks/lik.svg)](https://david-dm.org/pushrocks/lik)
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/lik/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/lik/master/dependencies/npm)
[![bitHound Code](https://www.bithound.io/github/pushrocks/lik/badges/code.svg)](https://www.bithound.io/github/pushrocks/lik)
[![TypeScript](https://img.shields.io/badge/TypeScript-2.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
## Usage
Use TypeScript for best in class instellisense.
```javascript
// import any tool that you need from lik
import { Stringmap, Objectmap, Observablemap } from "lik";
```
### class Stringmap
Stringmap allows you to keep track of strings. It allows you to register triggers for certain events
like when a certain string is removed or added to the map
### class Objectmap
Sometimes you need to keep track of objects, but implementing logic for removing, finding or updating is tedious.
Objectmap takes care of keeping track of objects for you.
### class Observablemap
Event Emitters are nice. However often times you end up with registering multiple listeners for the exact same thing.
Observables have a smaller footprint and a more manageable subscribe logic.
Observablemap registers only one rxjs observable per event and then continues to reference
the same observable that you can subscribe to.
For further information read the linked docs at the top of this README.
> MIT licensed | **&copy;** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://push.rocks)

View File

@ -1,10 +1,13 @@
{
"npmci": {
"globalNpmTools": [
"npmGlobalTools": [
"npmts"
]
},
"npmts": {
"coverageTreshold": 40
"coverageTreshold": 40,
"testConfig": {
"parallel": false
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "lik",
"version": "1.0.29",
"version": "2.0.0",
"description": "light little helpers for node",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
@ -18,18 +18,14 @@
},
"homepage": "https://gitlab.com/pushrocks/lik#README",
"devDependencies": {
"@types/should": "^8.1.30",
"should": "^11.2.1",
"typings-test": "^1.0.3"
"tapbundle": "^1.1.1"
},
"dependencies": {
"@types/lodash": "^4.14.62",
"@types/minimatch": "2.x.x",
"@types/q": "1.x.x",
"@types/lodash": "^4.14.74",
"@types/minimatch": "3.x.x",
"lodash": "^4.17.4",
"minimatch": "^3.0.3",
"q": "^1.5.0",
"rxjs": "^5.3.0",
"typings-global": "^1.0.14"
"minimatch": "^3.0.4",
"smartq": "^1.1.6",
"typings-global": "^1.0.20"
}
}

File diff suppressed because one or more lines are too long

17
test/test.limitedarray.ts Normal file
View File

@ -0,0 +1,17 @@
import { tap, expect } from 'tapbundle'
import { LimitedArray } from '../ts/index'
let testLimitedArray: LimitedArray<string>
tap.test('should create a LimitedArray', async () => {
testLimitedArray = new LimitedArray(6)
expect(testLimitedArray).to.be.instanceof(LimitedArray)
})
tap.test('should never be longer than the set length', async () => {
testLimitedArray.addMany(['hi','this','is','quite','a','long','string',':)'])
expect(testLimitedArray.array.length).to.be.lessThan(7)
})
tap.start()

26
test/test.looptracker.ts Normal file
View File

@ -0,0 +1,26 @@
// import test framework
import { expect, tap } from 'tapbundle'
import * as events from 'events'
import * as smartq from 'smartq'
// import the module
import * as lik from '../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()

76
test/test.objectmap.ts Normal file
View File

@ -0,0 +1,76 @@
// import test framework
import { expect, tap } from 'tapbundle'
import * as events from 'events'
import * as smartq from 'smartq'
// import the module
import * as lik from '../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()

78
test/test.stringmap.ts Normal file
View File

@ -0,0 +1,78 @@
// import test framework
import { expect, tap } from 'tapbundle'
import * as events from 'events'
import * as smartq from 'smartq'
// import the module
import * as lik from '../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()

View File

@ -1,134 +0,0 @@
import 'typings-test'
import * as events from 'events'
import * as rx from 'rxjs/Rx'
import * as should from 'should'
import lik = require('../dist/index')
describe('lik',function(){
describe('Stringmap',function(){
let testStringmap: lik.Stringmap
let testString1 = 'testString1'
let testString2 = 'testString2'
let testString3 = 'testString3'
let testString4 = 'testString4'
let testString5 = 'testString5'
let testString6 = 'testString6'
it('new lik.Objectmap() -> should create an instance of Stringmap',function(){
testStringmap = new lik.Stringmap()
should(testStringmap).be.instanceof(lik.Stringmap)
})
it('lik.Stringmap.checkString -> should return false for an string not in Stringmap',function(){
should(testStringmap.checkString(testString1)).be.false()
})
it('lik.Stringmap.addString -> should add an string to Stringmap',function(){
testStringmap.addString(testString1)
testStringmap.addString(testString2)
testStringmap.addString(testString3)
should(testStringmap.checkString(testString1)).be.true()
should(testStringmap.checkString(testString2)).be.true()
should(testStringmap.checkString(testString3)).be.true()
should(testStringmap.checkMinimatch('*String1')).be.true()
should(testStringmap.checkMinimatch('*String2')).be.true()
should(testStringmap.checkMinimatch('*String4')).be.false()
})
it('lik.Stringmap.addStringArray -> should add an array of strings',function(){
testStringmap.addStringArray([testString4,testString5,testString6])
should(testStringmap.checkMinimatch('*String4')).be.true()
})
it('lik.Stringmap.removeString -> should remove a string from Stringmap',function(){
testStringmap.removeString(testString2)
should(testStringmap.checkString(testString2)).be.false()
})
it('lik.Stringmap.getStringArray() -> should return a copy of stringArray',function(){
let clonedArray = testStringmap.getStringArray()
should(clonedArray[0] === 'testString1').be.true()
should(clonedArray[0] === testString1).be.true()
})
it('lik.Stringmap.checkIsEmpty() -> should register a function to trigger when empty',function(){
testStringmap.registerUntilTrue(
() => { return testStringmap.checkIsEmpty() },
() => { console.log('Stringmap now is empty') }
)
})
it('lik.Stringmap.empty() -> should remove wipe and then notify',function(){
testStringmap.wipe()
})
})
describe('Objectmap',function(){
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'
}
it('new lik.Objectmap() -> should correctly instantiate an Objectmap',function(){
testObjectmap = new lik.Objectmap<ITestObject>()
should(testObjectmap).be.instanceof(lik.Objectmap)
})
it('lik.Objectmap.add() -> should correctly add an object to Objectmap',function(){
testObjectmap.add(testObject1)
should(testObjectmap.checkForObject(testObject1)).be.true
should(testObjectmap.checkForObject(testObject2)).be.false
})
it('lik.Objectmap.remove() -> should correctly remove an object to Objectmap',function(){
testObjectmap.add(testObject2)
testObjectmap.remove(testObject1)
should(testObjectmap.checkForObject(testObject1)).be.false
should(testObjectmap.checkForObject(testObject2)).be.true
})
it('Objectmap.forEach -> should correctly run a function forEach map object',function(){
testObjectmap.forEach(itemArg => {
should(itemArg).have.ownProperty('propOne')
})
})
it('lik.Objectmap.find() -> should correctly find an object',function(){
let myObject = {propOne: 'helloThere', propTwo: 'helloAnyway'}
testObjectmap.add(myObject)
let referenceObject = testObjectmap.find((itemArg) => { return (itemArg.propOne === 'helloThere') })
should(myObject === referenceObject).be.true()
})
it('lik.Objectmap.getArray() -> should return a cloned array', function(){
let myObject = {propOne : 'test1', propTwo: 'wow, how awesome'}
testObjectmap.add(myObject)
let clonedArray = testObjectmap.getArray()
should(clonedArray[clonedArray.length - 1]).eql(myObject)
})
it('should get one object and then remove it', function() {
let originalLength = testObjectmap.getArray().length
let oneObject = testObjectmap.getOneAndRemove()
should(oneObject).not.be.null()
should(testObjectmap.getArray().length).equal(originalLength - 1)
should(testObjectmap.getArray()).not.containEql(oneObject)
})
})
describe('Observablemap',function(){
let testObservablemap: lik.Observablemap
let testObservable1: rx.Observable<any>
let testObservable2: rx.Observable<any>
let testObservable3: rx.Observable<any>
let testEmitter: events.EventEmitter
it('should create an instance',function(){
testObservablemap = new lik.Observablemap()
should(testObservablemap).be.instanceof(lik.Observablemap)
})
it('should accept a new emitter',function(done) {
testEmitter = new events.EventEmitter()
testObservable1 = testObservablemap.getObservableForEmitterEvent(testEmitter,'event1')
testObservable1.subscribe(x => {
done()
})
testObservable2 = testObservablemap.getObservableForEmitterEvent(testEmitter,'event1')
testObservable3 = testObservablemap.getObservableForEmitterEvent(testEmitter, 'event2')
should(testObservable1 === testObservable2).be.true()
should(testObservable1 === testObservable3).be.false()
testEmitter.emit('event1')
})
})
})

View File

@ -2,6 +2,7 @@ import * as plugins from './lik.plugins'
// import modules
export * from './lik.stringmap'
export * from './lik.looptracker'
export * from './lik.objectmap'
export * from './lik.observablemap'
export * from './lik.stringmap'
export * from './lik.limitedarray'

43
ts/lik.limitedarray.ts Normal file
View File

@ -0,0 +1,43 @@
import * as plugins from './lik.plugins'
export class LimitedArray<T> {
array: T[] = []
arrayLimit: number
constructor(limitArg: number) {
this.arrayLimit = limitArg
}
addOne (objectArg: T) {
this.array.unshift(objectArg)
if (this.array.length > this.arrayLimit) {
this.array.length = this.arrayLimit
}
}
addMany (objectArrayArg: T[]) {
for (let objectArg of objectArrayArg) {
this.addOne(objectArg)
}
}
setLimit (limitArg: number) {
this.arrayLimit = limitArg
if (this.array.length > this.arrayLimit) {
this.array.length = this.arrayLimit
}
}
getAverage ():number {
if (typeof this.array[0] === 'number') {
let sum = 0
for (let localNumber of this.array) {
let localNumberAny: any = localNumber
sum = sum + localNumberAny
}
return sum / this.array.length
} else {
return null
}
}
}

18
ts/lik.looptracker.ts Normal file
View 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)
}
}

View File

@ -18,14 +18,23 @@ export class Objectmap<T> {
* returns a new instance
*/
constructor () {
// nothing here
}
/**
* 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 {
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
}
}
/**
@ -59,7 +68,7 @@ export class Objectmap<T> {
/**
* finds a specific element and then removes it
*/
findOneAndRemove(findFunction): T {
findOneAndRemove (findFunction: IObjectmapFindFunction<T>): T {
let foundElement = this.find(findFunction)
if (foundElement) {
this.remove(foundElement)
@ -70,8 +79,10 @@ export class Objectmap<T> {
/**
* run function for each item in Objectmap
*/
forEach(functionArg: IObjectmapForEachFunction<T>) {
return this.objectArray.forEach(functionArg)
async forEach (functionArg: IObjectmapForEachFunction<T>) {
for (let object of this.objectArray) {
await functionArg(object)
}
}
/**

View File

@ -1,42 +0,0 @@
import * as plugins from './lik.plugins'
import { Objectmap } from './lik.objectmap'
import { Stringmap } from './lik.stringmap'
import { Observable } from 'rxjs/Rx'
/**
* bundles an observable with an emitter
*/
export interface ObservableEmitterBundle {
observable: plugins.rx.Observable<any>
emitter: plugins.events.EventEmitter
event: string
}
/**
* manages observables by making sure that only one observable is regsitered per event
*/
export class Observablemap {
ObservableEmitterBundleObjectmap = new Objectmap<ObservableEmitterBundle>()
/**
* creates a new observable if not yet registered for the same event.
* In case event has been registered before the same observable is returned.
*/
getObservableForEmitterEvent(emitterArg: plugins.events.EventEmitter, eventArg: string) {
let existingBundle = this.ObservableEmitterBundleObjectmap.find((bundleArg) => {
return(bundleArg.emitter === emitterArg && bundleArg.event === eventArg)
})
if (existingBundle) {
return existingBundle.observable
} else {
let emitterObservable = plugins.rx.Observable.fromEvent(emitterArg, eventArg)
this.ObservableEmitterBundleObjectmap.add({
observable: emitterObservable,
emitter: emitterArg,
event: eventArg
})
return emitterObservable
}
}
}

View File

@ -1,6 +1,12 @@
import 'typings-global'
export import q = require('q')
export import events = require('events')
export import lodash = require('lodash')
export import minimatch = require('minimatch')
export import rx = require('rxjs/Rx')
import * as smartq from 'smartq'
import * as events from 'events'
import * as lodash from 'lodash'
import * as minimatch from 'minimatch'
export {
smartq,
events,
lodash,
minimatch
}

398
yarn.lock
View File

@ -2,56 +2,189 @@
# yarn lockfile v1
"@types/lodash@^4.14.62":
version "4.14.62"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.62.tgz#8674f9861582148a60b7a89cb260f11378d11683"
"@types/minimatch@2.x.x":
version "2.0.29"
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a"
"@types/mocha@^2.2.31":
version "2.2.40"
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.40.tgz#9811dd800ece544cd84b5b859917bf584a150c4c"
"@types/q@1.x.x":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.0.0.tgz#57e5465d665b370d4217e69b344b20faa6b724f5"
"@types/should@^8.1.30":
version "8.1.30"
resolved "https://registry.yarnpkg.com/@types/should/-/should-8.1.30.tgz#e6b4f3ca4fb0799f6ce3303f3a8c003df6585aa3"
balanced-match@^0.4.1:
version "0.4.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
brace-expansion@^1.0.0:
version "1.1.7"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59"
"@types/chai-as-promised@0.0.29":
version "0.0.29"
resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-0.0.29.tgz#43d52892aa998e185a3de3e2477edb8573be1d77"
dependencies:
balanced-match "^0.4.1"
"@types/chai" "*"
"@types/promises-a-plus" "*"
"@types/chai-string@^1.1.30":
version "1.1.31"
resolved "https://registry.yarnpkg.com/@types/chai-string/-/chai-string-1.1.31.tgz#a22f75d713f69da8c5cf34f8bc808a62cd249405"
dependencies:
"@types/chai" "*"
"@types/chai@*":
version "4.0.4"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.0.4.tgz#fe86315d9a66827feeb16f73bc954688ec950e18"
"@types/chai@^3.4.35":
version "3.5.2"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.5.2.tgz#c11cd2817d3a401b7ba0f5a420f35c56139b1c1e"
"@types/glob@*":
version "5.0.32"
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.32.tgz#aec5cfe987c72f099fdb1184452986aa506d5e8f"
dependencies:
"@types/minimatch" "*"
"@types/node" "*"
"@types/lodash@^4.14.74":
version "4.14.74"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.74.tgz#ac3bd8db988e7f7038e5d22bd76a7ba13f876168"
"@types/minimatch@*", "@types/minimatch@3.x.x":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.1.tgz#b683eb60be358304ef146f5775db4c0e3696a550"
"@types/node@*":
version "8.0.29"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.29.tgz#4d6b33df66b15611b40452a581c40d9c94341ba1"
"@types/promises-a-plus@*":
version "0.0.27"
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
"@types/shelljs@^0.7.4":
version "0.7.4"
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.4.tgz#137b5f31306eaff4de120ffe5b9d74b297809cfc"
dependencies:
"@types/glob" "*"
"@types/node" "*"
"@types/which@^1.0.28":
version "1.0.28"
resolved "https://registry.yarnpkg.com/@types/which/-/which-1.0.28.tgz#016e387629b8817bed653fe32eab5d11279c8df6"
ansi-256-colors@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz#910de50efcc7c09e3d82f2f87abd6b700c18818a"
assertion-error@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
beautycolor@^1.0.7:
version "1.0.11"
resolved "https://registry.yarnpkg.com/beautycolor/-/beautycolor-1.0.11.tgz#71c5568d5a7ed5c144d3a54f753ad1b08862aea5"
dependencies:
ansi-256-colors "^1.1.0"
typings-global "^1.0.14"
bindings@^1.2.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.3.0.tgz#b346f6ecf6a95f5a815c5839fc7cdb22502f1ed7"
brace-expansion@^1.1.7:
version "1.1.8"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
dependencies:
balanced-match "^1.0.0"
concat-map "0.0.1"
chai-as-promised@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-6.0.0.tgz#1a02a433a6f24dafac63b9c96fa1684db1aa8da6"
dependencies:
check-error "^1.0.2"
chai-string@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.4.0.tgz#359140c051d36a4e4b1a5fc6b910152f438a8d49"
chai@^3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
dependencies:
assertion-error "^1.0.1"
deep-eql "^0.1.3"
type-detect "^1.0.0"
check-error@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
deep-eql@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2"
dependencies:
type-detect "0.1.1"
define-properties@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94"
dependencies:
foreach "^2.0.5"
object-keys "^1.0.8"
early@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/early/-/early-2.1.1.tgz#841e23254ea5dc54d8afaeee82f5ab65c00ee23c"
dependencies:
beautycolor "^1.0.7"
smartq "^1.1.1"
typings-global "^1.0.16"
es-abstract@^1.5.1:
version "1.8.2"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.8.2.tgz#25103263dc4decbda60e0c737ca32313518027ee"
dependencies:
es-to-primitive "^1.1.1"
function-bind "^1.1.1"
has "^1.0.1"
is-callable "^1.1.3"
is-regex "^1.0.4"
es-to-primitive@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d"
dependencies:
is-callable "^1.1.1"
is-date-object "^1.0.1"
is-symbol "^1.0.1"
es6-error@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.2.tgz#eec5c726eacef51b7f6b73c20db6e1b13b069c98"
foreach@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
function-bind@^1.0.2, function-bind@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
glob@^7.0.0:
version "7.1.1"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
version "7.1.2"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"
has@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28"
dependencies:
function-bind "^1.0.2"
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
@ -64,18 +197,80 @@ inherits@2:
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
interpret@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.2.tgz#f4f623f0bb7122f15f5717c8e254b8161b5c5b2d"
version "1.0.4"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.4.tgz#820cdd588b868ffb191a809506d6c9c8f212b1b0"
is-callable@^1.1.1, is-callable@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
is-date-object@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
is-regex@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
dependencies:
has "^1.0.1"
is-symbol@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
leakage@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.3.0.tgz#15d698abdc76bbc6439601f4f3020e77e2d50c39"
dependencies:
es6-error "^4.0.2"
left-pad "^1.1.3"
memwatch-next "^0.3.0"
minimist "^1.2.0"
pretty-bytes "^4.0.2"
left-pad@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.1.3.tgz#612f61c033f3a9e08e939f1caebeea41b6f3199a"
lodash@^4.17.4:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
minimatch@^3.0.2, minimatch@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
memwatch-next@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/memwatch-next/-/memwatch-next-0.3.0.tgz#2111050f9a906e0aa2d72a4ec0f0089c78726f8f"
dependencies:
brace-expansion "^1.0.0"
bindings "^1.2.1"
nan "^2.3.2"
minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
dependencies:
brace-expansion "^1.1.7"
minimist@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
nan@^2.3.2:
version "2.7.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46"
object-keys@^1.0.8:
version "1.0.11"
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
object.getownpropertydescriptors@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16"
dependencies:
define-properties "^1.1.2"
es-abstract "^1.5.1"
once@^1.3.0:
version "1.4.0"
@ -91,9 +286,9 @@ path-parse@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
q@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1"
pretty-bytes@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
rechoir@^0.6.2:
version "0.6.2"
@ -102,84 +297,97 @@ rechoir@^0.6.2:
resolve "^1.1.6"
resolve@^1.1.6:
version "1.3.2"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.2.tgz#1f0442c9e0cbb8136e87b9305f932f46c7f28235"
version "1.4.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86"
dependencies:
path-parse "^1.0.5"
rxjs@^5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.3.0.tgz#d88ccbdd46af290cbdb97d5d8055e52453fabe2d"
dependencies:
symbol-observable "^1.0.1"
semver@^5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
version "5.4.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
shelljs@^0.7.4:
version "0.7.7"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1"
shelljs@^0.7.8:
version "0.7.8"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
dependencies:
glob "^7.0.0"
interpret "^1.0.0"
rechoir "^0.6.2"
should-equal@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/should-equal/-/should-equal-1.0.1.tgz#0b6e9516f2601a9fb0bb2dcc369afa1c7e200af7"
smartchai@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/smartchai/-/smartchai-1.0.3.tgz#de6d010bb8b5aef24cb70b31a5f5334e8c41b72f"
dependencies:
should-type "^1.0.0"
"@types/chai" "^3.4.35"
"@types/chai-as-promised" "0.0.29"
"@types/chai-string" "^1.1.30"
chai "^3.5.0"
chai-as-promised "^6.0.0"
chai-string "^1.3.0"
should-format@^3.0.2:
version "3.0.3"
resolved "https://registry.yarnpkg.com/should-format/-/should-format-3.0.3.tgz#9bfc8f74fa39205c53d38c34d717303e277124f1"
smartdelay@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.3.tgz#5fd44dad77262d110702f0293efa80c072cfb579"
dependencies:
should-type "^1.3.0"
should-type-adaptors "^1.0.1"
smartq "^1.1.1"
typings-global "^1.0.16"
should-type-adaptors@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/should-type-adaptors/-/should-type-adaptors-1.0.1.tgz#efe5553cdf68cff66e5c5f51b712dc351c77beaa"
smartq@^1.1.1, smartq@^1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.6.tgz#0c1ff4336d95e95b4f1fdd8ccd7e2c5a323b8412"
dependencies:
should-type "^1.3.0"
should-util "^1.0.0"
typings-global "^1.0.19"
util.promisify "^1.0.0"
should-type@^1.0.0, should-type@^1.3.0, should-type@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/should-type/-/should-type-1.4.0.tgz#0756d8ce846dfd09843a6947719dfa0d4cff5cf3"
smartshell@^1.0.6:
version "1.0.18"
resolved "https://registry.yarnpkg.com/smartshell/-/smartshell-1.0.18.tgz#b84ccc65cedf3a875bf676cec78ee07f4b4aa9e5"
dependencies:
"@types/shelljs" "^0.7.4"
"@types/which" "^1.0.28"
shelljs "^0.7.8"
smartq "^1.1.6"
typings-global "^1.0.20"
which "^1.3.0"
should-util@^1.0.0:
tapbundle@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-1.1.1.tgz#ec4172c0e82a77b1f6133fef2606311ede28a62d"
dependencies:
early "^2.1.1"
leakage "^0.3.0"
smartchai "^1.0.3"
smartdelay "^1.0.3"
smartq "^1.1.1"
typings-global "^1.0.19"
type-detect@0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"
type-detect@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/should-util/-/should-util-1.0.0.tgz#c98cda374aa6b190df8ba87c9889c2b4db620063"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
should@^11.2.1:
version "11.2.1"
resolved "https://registry.yarnpkg.com/should/-/should-11.2.1.tgz#90f55145552d01cfc200666e4e818a1c9670eda2"
dependencies:
should-equal "^1.0.0"
should-format "^3.0.2"
should-type "^1.4.0"
should-type-adaptors "^1.0.1"
should-util "^1.0.0"
symbol-observable@^1.0.1:
version "1.0.4"
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d"
typings-global@*, typings-global@^1.0.14:
version "1.0.14"
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.14.tgz#ab682720a03d6b9278869fb5c30c30d7dc61d12c"
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.19, typings-global@^1.0.20:
version "1.0.20"
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.20.tgz#3da769c54db538247c5d877d1d9e97eb2ec981ff"
dependencies:
semver "^5.3.0"
shelljs "^0.7.4"
smartshell "^1.0.6"
typings-test@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/typings-test/-/typings-test-1.0.3.tgz#fbab895eb3f0c44842e73db059f65946b971e369"
util.promisify@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030"
dependencies:
"@types/mocha" "^2.2.31"
typings-global "*"
define-properties "^1.1.2"
object.getownpropertydescriptors "^2.0.3"
which@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"
dependencies:
isexe "^2.0.0"
wrappy@1:
version "1.0.2"