Compare commits
66 Commits
Author | SHA1 | Date | |
---|---|---|---|
d53f5410cd | |||
53516b1c8f | |||
e59205490b | |||
38884ff59c | |||
861833e930 | |||
1274840d17 | |||
d2ce1094de | |||
6b3fcff971 | |||
011a865271 | |||
78914e54b3 | |||
281cfdc38a | |||
217252de1e | |||
ab7f7230ef | |||
7f03ae5248 | |||
0060ec2971 | |||
eec89a596a | |||
d34a91d283 | |||
db14306bcf | |||
cf446f90ee | |||
9c2f3cf678 | |||
18df32ae5a | |||
66b6e78bb1 | |||
408faa97a4 | |||
4a7749be47 | |||
570283551f | |||
c6c5c5ea40 | |||
ddd071ccb6 | |||
8b9c87d381 | |||
89ea1fdb18 | |||
5b2aea7626 | |||
cfbc47e365 | |||
bb3b02ed74 | |||
bb4820e980 | |||
fa17a998f1 | |||
afad357ed0 | |||
59173eebc4 | |||
515571dcb3 | |||
177ed2d03d | |||
23ecaddd5a | |||
924058c90a | |||
30e23a77b7 | |||
b228c3b2f0 | |||
610a037879 | |||
2f681911ae | |||
3b04f81b68 | |||
0c05cf4f7b | |||
5451cceaf3 | |||
04dbc36525 | |||
a820e0d1b3 | |||
57c67a287a | |||
d73bfa8f00 | |||
e917c8b9f7 | |||
c0a5cb6e30 | |||
b85e79b07d | |||
ba714fe637 | |||
3dd4698ce8 | |||
9814e93dda | |||
5d06e6e78f | |||
f6c03275f4 | |||
d6ca9910e3 | |||
ac2267d910 | |||
49f0d7018d | |||
009a1181e5 | |||
3c09f048a2 | |||
1bdcae0524 | |||
62892fa1b8 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
docs/
|
pages/
|
||||||
|
public/
|
||||||
coverage/
|
coverage/
|
||||||
.nogit/
|
.nogit/
|
@ -1,20 +1,31 @@
|
|||||||
image: hosttoday/ht-docker-node:npmts
|
# gitzone standard
|
||||||
|
image: hosttoday/ht-docker-node:npmci
|
||||||
|
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .yarn/
|
||||||
|
key: "$CI_BUILD_STAGE"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- release
|
- release
|
||||||
|
- trigger
|
||||||
|
- pages
|
||||||
|
|
||||||
testLEGACY:
|
testLEGACY:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test legacy
|
- npmci test legacy
|
||||||
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
testLTS:
|
testLTS:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test lts
|
- npmci test lts
|
||||||
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
@ -22,15 +33,40 @@ testSTABLE:
|
|||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test stable
|
- npmci test stable
|
||||||
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
environment: npmjs-com_registry
|
|
||||||
script:
|
script:
|
||||||
- npmci publish
|
- npmci publish
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
stage: trigger
|
||||||
|
script:
|
||||||
|
- npmci trigger
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
pages:
|
||||||
|
image: hosttoday/ht-docker-node:npmci
|
||||||
|
stage: pages
|
||||||
|
script:
|
||||||
|
- npmci command yarn global add npmpage
|
||||||
|
- npmci command npmpage
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
artifacts:
|
||||||
|
expire_in: 1 week
|
||||||
|
paths:
|
||||||
|
- public
|
||||||
|
allow_failure: true
|
||||||
|
47
README.md
47
README.md
@ -1,13 +1,48 @@
|
|||||||
# lik
|
# lik
|
||||||
light little helpers for node
|
light little helpers for node
|
||||||
|
|
||||||
## Status
|
## Availabililty
|
||||||
[](https://gitlab.com/pushrocks/lik/commits/master)
|
[](https://www.npmjs.com/package/lik)
|
||||||
|
[](https://GitLab.com/pushrocks/lik)
|
||||||
|
[](https://github.com/pushrocks/lik)
|
||||||
|
[](https://pushrocks.gitlab.io/lik/)
|
||||||
|
|
||||||
|
## Status for master
|
||||||
|
[](https://GitLab.com/pushrocks/lik/commits/master)
|
||||||
|
[](https://GitLab.com/pushrocks/lik/commits/master)
|
||||||
|
[](https://www.npmjs.com/package/lik)
|
||||||
|
[](https://david-dm.org/pushrocks/lik)
|
||||||
|
[](https://www.bithound.io/github/pushrocks/lik/master/dependencies/npm)
|
||||||
|
[](https://www.bithound.io/github/pushrocks/lik)
|
||||||
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
|
[](http://standardjs.com/)
|
||||||
|
|
||||||
## Usage
|
## 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 any tool that you need from lik
|
||||||
import {Stringmap} 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 | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||||
|
|
||||||
|
[](https://push.rocks)
|
||||||
|
7
dist/index.d.ts
vendored
7
dist/index.d.ts
vendored
@ -1,2 +1,5 @@
|
|||||||
export * from "./lik.stringmap";
|
export * from './lik.looptracker';
|
||||||
export * from "./lik.objectmap";
|
export * from './lik.objectmap';
|
||||||
|
export * from './lik.observablemap';
|
||||||
|
export * from './lik.stringmap';
|
||||||
|
export * from './lik.limitedarray';
|
||||||
|
8
dist/index.js
vendored
8
dist/index.js
vendored
@ -2,7 +2,11 @@
|
|||||||
function __export(m) {
|
function __export(m) {
|
||||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||||
}
|
}
|
||||||
|
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"));
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBRUEsaUJBQWlCO0FBRWpCLGlCQUFjLGlCQUFpQixDQUFDLEVBQUE7QUFDaEMsaUJBQWMsaUJBQWlCLENBQUMsRUFBQSJ9
|
__export(require("./lik.observablemap"));
|
||||||
|
__export(require("./lik.stringmap"));
|
||||||
|
__export(require("./lik.limitedarray"));
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUVBLGlCQUFpQjtBQUVqQix1Q0FBaUM7QUFDakMscUNBQStCO0FBQy9CLHlDQUFtQztBQUNuQyxxQ0FBK0I7QUFDL0Isd0NBQWtDIn0=
|
9
dist/lik.limitedarray.d.ts
vendored
Normal file
9
dist/lik.limitedarray.d.ts
vendored
Normal 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
40
dist/lik.limitedarray.js
vendored
Normal 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
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
|
51
dist/lik.objectmap.d.ts
vendored
51
dist/lik.objectmap.d.ts
vendored
@ -1,27 +1,60 @@
|
|||||||
export interface IObjectmapForEach {
|
export interface IObjectmapForEachFunction<T> {
|
||||||
(itemArg: any): void;
|
(itemArg: T): void;
|
||||||
|
}
|
||||||
|
export interface IObjectmapFindFunction<T> {
|
||||||
|
(itemArg: T): boolean;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* allows keeping track of objects
|
* allows keeping track of objects
|
||||||
*/
|
*/
|
||||||
export declare class Objectmap {
|
export declare class Objectmap<T> {
|
||||||
private objectArray;
|
private objectArray;
|
||||||
/**
|
/**
|
||||||
* add object to Objectmap
|
* returns a new instance
|
||||||
*/
|
*/
|
||||||
add(objectArg: any): void;
|
constructor();
|
||||||
/**
|
/**
|
||||||
* remove object from Objectmap
|
* add object to Objectmap
|
||||||
|
* returns false if the object is already in the map
|
||||||
|
* returns true if the object was added successfully
|
||||||
*/
|
*/
|
||||||
remove(objectArg: any): void;
|
add(objectArg: T): boolean;
|
||||||
|
/**
|
||||||
|
* like .add but adds an whole array of objects
|
||||||
|
*/
|
||||||
|
addArray(objectArrayArg: T[]): void;
|
||||||
/**
|
/**
|
||||||
* check if object is in Objectmap
|
* check if object is in Objectmap
|
||||||
*/
|
*/
|
||||||
checkForObject(objectArg: any): number;
|
checkForObject(objectArg: T): boolean;
|
||||||
|
/**
|
||||||
|
* find object
|
||||||
|
*/
|
||||||
|
find(findFunction: IObjectmapFindFunction<T>): T;
|
||||||
|
/**
|
||||||
|
* finds a specific element and then removes it
|
||||||
|
*/
|
||||||
|
findOneAndRemove(findFunction: IObjectmapFindFunction<T>): T;
|
||||||
/**
|
/**
|
||||||
* run function for each item in Objectmap
|
* run function for each item in Objectmap
|
||||||
*/
|
*/
|
||||||
forEach(functionArg: IObjectmapForEach): void;
|
forEach(functionArg: IObjectmapForEachFunction<T>): Promise<void>;
|
||||||
|
/**
|
||||||
|
* gets an object in the Observablemap and removes it, so it can't be retrieved again
|
||||||
|
*/
|
||||||
|
getOneAndRemove(): T;
|
||||||
|
/**
|
||||||
|
* returns a cloned array of all the objects currently in the Objectmap
|
||||||
|
*/
|
||||||
|
getArray(): T[];
|
||||||
|
/**
|
||||||
|
* check if Objectmap ist empty
|
||||||
|
*/
|
||||||
|
isEmpty(): boolean;
|
||||||
|
/**
|
||||||
|
* remove object from Objectmap
|
||||||
|
*/
|
||||||
|
remove(objectArg: T): void;
|
||||||
/**
|
/**
|
||||||
* wipe Objectmap
|
* wipe Objectmap
|
||||||
*/
|
*/
|
||||||
|
115
dist/lik.objectmap.js
vendored
115
dist/lik.objectmap.js
vendored
@ -1,44 +1,121 @@
|
|||||||
"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 });
|
||||||
|
const plugins = require("./lik.plugins");
|
||||||
/**
|
/**
|
||||||
* allows keeping track of objects
|
* allows keeping track of objects
|
||||||
*/
|
*/
|
||||||
class Objectmap {
|
class Objectmap {
|
||||||
|
/**
|
||||||
|
* returns a new instance
|
||||||
|
*/
|
||||||
constructor() {
|
constructor() {
|
||||||
this.objectArray = [];
|
this.objectArray = [];
|
||||||
|
// nothing here
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 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;
|
||||||
/**
|
}
|
||||||
* remove object from Objectmap
|
else {
|
||||||
*/
|
// the object is not yet in the objectmap
|
||||||
remove(objectArg) {
|
this.objectArray.push(objectArg);
|
||||||
let replacmentArray = [];
|
return true;
|
||||||
for (let item of this.objectArray) {
|
}
|
||||||
if (item !== objectArg) {
|
}
|
||||||
replacmentArray.push(item);
|
/**
|
||||||
}
|
* like .add but adds an whole array of objects
|
||||||
|
*/
|
||||||
|
addArray(objectArrayArg) {
|
||||||
|
for (let item of objectArrayArg) {
|
||||||
|
this.add(item);
|
||||||
}
|
}
|
||||||
;
|
|
||||||
this.objectArray = replacmentArray;
|
|
||||||
}
|
}
|
||||||
;
|
|
||||||
/**
|
/**
|
||||||
* check if object is in Objectmap
|
* check if object is in Objectmap
|
||||||
*/
|
*/
|
||||||
checkForObject(objectArg) {
|
checkForObject(objectArg) {
|
||||||
return this.objectArray.indexOf(objectArg !== -1);
|
return this.objectArray.indexOf(objectArg) !== -1;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* find object
|
||||||
|
*/
|
||||||
|
find(findFunction) {
|
||||||
|
let resultArray = this.objectArray.filter(findFunction);
|
||||||
|
if (resultArray.length > 0) {
|
||||||
|
return resultArray[0];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* finds a specific element and then removes it
|
||||||
|
*/
|
||||||
|
findOneAndRemove(findFunction) {
|
||||||
|
let foundElement = this.find(findFunction);
|
||||||
|
if (foundElement) {
|
||||||
|
this.remove(foundElement);
|
||||||
|
}
|
||||||
|
return foundElement;
|
||||||
}
|
}
|
||||||
;
|
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
|
*/
|
||||||
|
getOneAndRemove() {
|
||||||
|
return this.objectArray.shift();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* returns a cloned array of all the objects currently in the Objectmap
|
||||||
|
*/
|
||||||
|
getArray() {
|
||||||
|
return plugins.lodash.cloneDeep(this.objectArray);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* check if Objectmap ist empty
|
||||||
|
*/
|
||||||
|
isEmpty() {
|
||||||
|
if (this.objectArray.length === 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* remove object from Objectmap
|
||||||
|
*/
|
||||||
|
remove(objectArg) {
|
||||||
|
let replacementArray = [];
|
||||||
|
for (let item of this.objectArray) {
|
||||||
|
if (item !== objectArg) {
|
||||||
|
replacementArray.push(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.objectArray = replacementArray;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* wipe Objectmap
|
* wipe Objectmap
|
||||||
@ -48,4 +125,4 @@ class Objectmap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.Objectmap = Objectmap;
|
exports.Objectmap = Objectmap;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlrLm9iamVjdG1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2xpay5vYmplY3RtYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQU9BOztHQUVHO0FBQ0g7SUFBQTtRQUNZLGdCQUFXLEdBQUcsRUFBRSxDQUFDO0lBeUM3QixDQUFDO0lBeENHOztPQUVHO0lBQ0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O1FBQ0wsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxNQUFNLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztZQUNsQyxNQUFNLENBQUMsSUFBSSxDQUFBO1FBQ2IsQ0FBQztRQUFDLElBQUksQ0FBQyxDQUFDO1lBQ04sTUFBTSxDQUFDLEtBQUssQ0FBQTtRQUNkLENBQUM7SUFDSCxDQUFDO0lBRUQ7O09BRUc7SUFDSCxNQUFNLENBQUUsU0FBWTtRQUNsQixJQUFJLGdCQUFnQixHQUFHLEVBQUUsQ0FBQTtRQUN6QixHQUFHLENBQUMsQ0FBQyxJQUFJLElBQUksSUFBSSxJQUFJLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQztZQUNsQyxFQUFFLENBQUMsQ0FBQyxJQUFJLEtBQUssU0FBUyxDQUFDLENBQUMsQ0FBQztnQkFDdkIsZ0JBQWdCLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFBO1lBQzdCLENBQUM7UUFDSCxDQUFDO1FBQ0QsSUFBSSxDQUFDLFdBQVcsR0FBRyxnQkFBZ0IsQ0FBQTtJQUNyQyxDQUFDO0lBRUQ7O09BRUc7SUFDSCxJQUFJO1FBQ0YsSUFBSSxDQUFDLFdBQVcsR0FBRyxFQUFFLENBQUE7SUFDdkIsQ0FBQztDQUNGO0FBdEhELDhCQXNIQyJ9
|
23
dist/lik.observablemap.d.ts
vendored
Normal file
23
dist/lik.observablemap.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/// <reference types="node" />
|
||||||
|
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>;
|
||||||
|
}
|
35
dist/lik.observablemap.js
vendored
Normal file
35
dist/lik.observablemap.js
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
"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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
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UFDLENBQUE7WUFDRixNQUFNLENBQUMsaUJBQWlCLENBQUE7UUFDMUIsQ0FBQztJQUNILENBQUM7Q0FDRjtBQXZCRCxzQ0F1QkMifQ==
|
16
dist/lik.plugins.d.ts
vendored
16
dist/lik.plugins.d.ts
vendored
@ -1,3 +1,13 @@
|
|||||||
import "typings-global";
|
import 'typings-global';
|
||||||
export import q = require("q");
|
export import q = require('q');
|
||||||
export import minimatch = require("minimatch");
|
export import events = require('events');
|
||||||
|
export import lodash = require('lodash');
|
||||||
|
export import minimatch = require('minimatch');
|
||||||
|
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>;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
6
dist/lik.plugins.js
vendored
6
dist/lik.plugins.js
vendored
@ -1,5 +1,9 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
require("typings-global");
|
require("typings-global");
|
||||||
exports.q = require("q");
|
exports.q = require("q");
|
||||||
|
exports.events = require("events");
|
||||||
|
exports.lodash = require("lodash");
|
||||||
exports.minimatch = require("minimatch");
|
exports.minimatch = require("minimatch");
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlrLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9saWsucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQ1YsU0FBQyxXQUFXLEdBQUcsQ0FBQyxDQUFDO0FBQ2pCLGlCQUFTLFdBQVcsV0FBVyxDQUFDLENBQUMifQ==
|
exports.rx = require("rxjs/Rx");
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlrLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9saWsucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2Qix5QkFBOEI7QUFDOUIsbUNBQXdDO0FBQ3hDLG1DQUF3QztBQUN4Qyx5Q0FBOEM7QUFDOUMsZ0NBQXFDIn0=
|
18
dist/lik.stringmap.d.ts
vendored
18
dist/lik.stringmap.d.ts
vendored
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* allows you to easily keep track of a bunch of strings;
|
* allows you to easily keep track of a bunch of strings
|
||||||
*/
|
*/
|
||||||
export interface triggerFunction {
|
export interface ITriggerFunction {
|
||||||
(): boolean;
|
(): boolean;
|
||||||
}
|
}
|
||||||
export declare class Stringmap {
|
export declare class Stringmap {
|
||||||
@ -12,6 +12,10 @@ export declare class Stringmap {
|
|||||||
* add a string to the Stringmap
|
* add a string to the Stringmap
|
||||||
*/
|
*/
|
||||||
addString(stringArg: string): void;
|
addString(stringArg: string): void;
|
||||||
|
/**
|
||||||
|
* like addString, but accepts an array of strings
|
||||||
|
*/
|
||||||
|
addStringArray(stringArrayArg: string[]): void;
|
||||||
/**
|
/**
|
||||||
* removes a string from Stringmap
|
* removes a string from Stringmap
|
||||||
*/
|
*/
|
||||||
@ -33,11 +37,15 @@ export declare class Stringmap {
|
|||||||
*/
|
*/
|
||||||
checkIsEmpty(): boolean;
|
checkIsEmpty(): boolean;
|
||||||
/**
|
/**
|
||||||
* notifies triggers
|
* gets a cloned copy of the current string Array
|
||||||
*/
|
*/
|
||||||
private notifyTrigger();
|
getStringArray(): string[];
|
||||||
/**
|
/**
|
||||||
* register a new trigger
|
* register a new trigger
|
||||||
*/
|
*/
|
||||||
registerUntilTrue(functionArg: triggerFunction, doFunctionArg: any): void;
|
registerUntilTrue(functionArg: ITriggerFunction, doFunctionArg: any): void;
|
||||||
|
/**
|
||||||
|
* notifies triggers
|
||||||
|
*/
|
||||||
|
private notifyTrigger();
|
||||||
}
|
}
|
||||||
|
41
dist/lik.stringmap.js
vendored
41
dist/lik.stringmap.js
vendored
@ -1,11 +1,11 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const plugins = require("./lik.plugins");
|
const plugins = require("./lik.plugins");
|
||||||
class Stringmap {
|
class Stringmap {
|
||||||
constructor() {
|
constructor() {
|
||||||
this._stringArray = [];
|
this._stringArray = [];
|
||||||
this._triggerUntilTrueFunctionArray = [];
|
this._triggerUntilTrueFunctionArray = [];
|
||||||
}
|
}
|
||||||
;
|
|
||||||
/**
|
/**
|
||||||
* add a string to the Stringmap
|
* add a string to the Stringmap
|
||||||
*/
|
*/
|
||||||
@ -13,7 +13,14 @@ class Stringmap {
|
|||||||
this._stringArray.push(stringArg);
|
this._stringArray.push(stringArg);
|
||||||
this.notifyTrigger();
|
this.notifyTrigger();
|
||||||
}
|
}
|
||||||
;
|
/**
|
||||||
|
* like addString, but accepts an array of strings
|
||||||
|
*/
|
||||||
|
addStringArray(stringArrayArg) {
|
||||||
|
for (let stringItem of stringArrayArg) {
|
||||||
|
this.addString(stringItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* removes a string from Stringmap
|
* removes a string from Stringmap
|
||||||
*/
|
*/
|
||||||
@ -22,9 +29,7 @@ class Stringmap {
|
|||||||
if (this._stringArray[keyArg] === stringArg) {
|
if (this._stringArray[keyArg] === stringArg) {
|
||||||
this._stringArray.splice(parseInt(keyArg), 1);
|
this._stringArray.splice(parseInt(keyArg), 1);
|
||||||
}
|
}
|
||||||
;
|
|
||||||
}
|
}
|
||||||
;
|
|
||||||
this.notifyTrigger();
|
this.notifyTrigger();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -38,7 +43,7 @@ class Stringmap {
|
|||||||
* check if string is in Stringmap
|
* check if string is in Stringmap
|
||||||
*/
|
*/
|
||||||
checkString(stringArg) {
|
checkString(stringArg) {
|
||||||
return this._stringArray.indexOf(stringArg) != -1;
|
return this._stringArray.indexOf(stringArg) !== -1;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* checks stringPresence with minimatch
|
* checks stringPresence with minimatch
|
||||||
@ -49,29 +54,22 @@ class Stringmap {
|
|||||||
if (plugins.minimatch(stringItem, miniMatchStringArg)) {
|
if (plugins.minimatch(stringItem, miniMatchStringArg)) {
|
||||||
foundMatch = true;
|
foundMatch = true;
|
||||||
}
|
}
|
||||||
;
|
|
||||||
}
|
}
|
||||||
;
|
|
||||||
return foundMatch;
|
return foundMatch;
|
||||||
}
|
}
|
||||||
;
|
|
||||||
/**
|
/**
|
||||||
* checks if the Stringmap is empty
|
* checks if the Stringmap is empty
|
||||||
*/
|
*/
|
||||||
checkIsEmpty() {
|
checkIsEmpty() {
|
||||||
return (this._stringArray.length === 0);
|
return (this._stringArray.length === 0);
|
||||||
}
|
}
|
||||||
// trigger registering
|
|
||||||
/**
|
/**
|
||||||
* notifies triggers
|
* gets a cloned copy of the current string Array
|
||||||
*/
|
*/
|
||||||
notifyTrigger() {
|
getStringArray() {
|
||||||
let filteredArray = this._triggerUntilTrueFunctionArray.filter((functionArg) => {
|
return plugins.lodash.cloneDeep(this._stringArray);
|
||||||
return !functionArg();
|
|
||||||
});
|
|
||||||
this._triggerUntilTrueFunctionArray = filteredArray;
|
|
||||||
}
|
}
|
||||||
;
|
// trigger registering
|
||||||
/**
|
/**
|
||||||
* register a new trigger
|
* register a new trigger
|
||||||
*/
|
*/
|
||||||
@ -85,6 +83,15 @@ class Stringmap {
|
|||||||
});
|
});
|
||||||
this.notifyTrigger();
|
this.notifyTrigger();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* notifies triggers
|
||||||
|
*/
|
||||||
|
notifyTrigger() {
|
||||||
|
let filteredArray = this._triggerUntilTrueFunctionArray.filter((functionArg) => {
|
||||||
|
return !functionArg();
|
||||||
|
});
|
||||||
|
this._triggerUntilTrueFunctionArray = filteredArray;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
exports.Stringmap = Stringmap;
|
exports.Stringmap = Stringmap;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlrLnN0cmluZ21hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2xpay5zdHJpbmdtYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE1BQVksT0FBTyxXQUFNLGVBQWUsQ0FBQyxDQUFBO0FBVXpDO0lBR0k7UUFGUSxpQkFBWSxHQUFZLEVBQUUsQ0FBQztRQUMzQixtQ0FBOEIsR0FBcUIsRUFBRSxDQUFDO0lBRzlELENBQUM7O0lBQ0Q7O09BRUc7SUFDSCxTQUFTLENBQUMsU0FBZ0I7UUFDdEIsSUFBSSxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUM7UUFDbEMsSUFBSSxDQUFDLGFBQWEsRUFBRSxDQUFDO0lBQ3pCLENBQUM7O0lBRUQ7O09BRUc7SUFDSCxZQUFZLENBQUMsU0FBZ0I7UUFDekIsR0FBRyxDQUFDLENBQUMsSUFBSSxNQUFNLElBQUksSUFBSSxDQUFDLFlBQVksQ0FBQyxDQUFBLENBQUM7WUFDbEMsRUFBRSxDQUFBLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxNQUFNLENBQUMsS0FBSyxTQUFTLENBQUMsQ0FBQSxDQUFDO2dCQUN4QyxJQUFJLENBQUMsWUFBWSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsTUFBTSxDQUFDLEVBQUMsQ0FBQyxDQUFDLENBQUM7WUFDakQsQ0FBQztZQUFBLENBQUM7UUFDTixDQUFDO1FBQUEsQ0FBQztRQUNGLElBQUksQ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0FBQyxDQUFBO1FBQ0YsSUFBSSxDQUFDLDhCQUE4QixHQUFHLGFBQWEsQ0FBQTtJQUNyRCxDQUFDO0NBRUY7QUF2R0QsOEJBdUdDIn0=
|
48
docs/index.md
Normal file
48
docs/index.md
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
# lik
|
||||||
|
light little helpers for node
|
||||||
|
|
||||||
|
## Availabililty
|
||||||
|
[](https://www.npmjs.com/package/lik)
|
||||||
|
[](https://GitLab.com/pushrocks/lik)
|
||||||
|
[](https://github.com/pushrocks/lik)
|
||||||
|
[](https://pushrocks.gitlab.io/lik/)
|
||||||
|
|
||||||
|
## Status for master
|
||||||
|
[](https://GitLab.com/pushrocks/lik/commits/master)
|
||||||
|
[](https://GitLab.com/pushrocks/lik/commits/master)
|
||||||
|
[](https://www.npmjs.com/package/lik)
|
||||||
|
[](https://david-dm.org/pushrocks/lik)
|
||||||
|
[](https://www.bithound.io/github/pushrocks/lik/master/dependencies/npm)
|
||||||
|
[](https://www.bithound.io/github/pushrocks/lik)
|
||||||
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
|
[](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 | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||||
|
|
||||||
|
[](https://push.rocks)
|
13
npmextra.json
Normal file
13
npmextra.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"npmci": {
|
||||||
|
"globalNpmTools": [
|
||||||
|
"npmts"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"npmts": {
|
||||||
|
"coverageTreshold": 40,
|
||||||
|
"testConfig": {
|
||||||
|
"parallel": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
package.json
19
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lik",
|
"name": "lik",
|
||||||
"version": "1.0.8",
|
"version": "1.0.41",
|
||||||
"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",
|
||||||
@ -18,14 +18,17 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/pushrocks/lik#README",
|
"homepage": "https://gitlab.com/pushrocks/lik#README",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"npmts-g": "^5.2.6",
|
"tapbundle": "^1.1.1"
|
||||||
"should": "^10.0.0",
|
|
||||||
"typings-test": "^1.0.1"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/minimatch": "^2.0.28",
|
"@types/lodash": "^4.14.74",
|
||||||
"@types/q": "^0.0.27",
|
"@types/minimatch": "3.x.x",
|
||||||
"minimatch": "^3.0.2",
|
"@types/q": "1.x.x",
|
||||||
"q": "^1.4.1"
|
"lodash": "^4.17.4",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"q": "^1.5.0",
|
||||||
|
"rxjs": "^5.4.3",
|
||||||
|
"smartq": "^1.1.6",
|
||||||
|
"typings-global": "^1.0.20"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
test/test.d.ts
vendored
2
test/test.d.ts
vendored
@ -1,2 +0,0 @@
|
|||||||
import "typings-test";
|
|
||||||
import "should";
|
|
72
test/test.js
72
test/test.js
@ -1,72 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
require("typings-test");
|
|
||||||
const lik = require("../dist/index");
|
|
||||||
require("should");
|
|
||||||
describe("lik", function () {
|
|
||||||
describe("Stringmap", function () {
|
|
||||||
let testStringmap;
|
|
||||||
let testString1 = "testString1";
|
|
||||||
let testString2 = "testString2";
|
|
||||||
let testString3 = "testString3";
|
|
||||||
it("should create an instance of Stringmap", function () {
|
|
||||||
testStringmap = new lik.Stringmap();
|
|
||||||
testStringmap.should.be.instanceof(lik.Stringmap);
|
|
||||||
});
|
|
||||||
it("should return false for an string not in Stringmap", function () {
|
|
||||||
testStringmap.checkString(testString1).should.be.false();
|
|
||||||
});
|
|
||||||
it("should add an string to Stringmap", function () {
|
|
||||||
testStringmap.addString(testString1);
|
|
||||||
testStringmap.addString(testString2);
|
|
||||||
testStringmap.addString(testString3);
|
|
||||||
testStringmap.checkString(testString1).should.be.true();
|
|
||||||
testStringmap.checkString(testString2).should.be.true();
|
|
||||||
testStringmap.checkString(testString3).should.be.true();
|
|
||||||
testStringmap.checkMinimatch("*String1").should.be.true();
|
|
||||||
testStringmap.checkMinimatch("*String2").should.be.true();
|
|
||||||
testStringmap.checkMinimatch("*String4").should.be.false();
|
|
||||||
});
|
|
||||||
it("should remove a string from Stringmap", function () {
|
|
||||||
testStringmap.removeString(testString2);
|
|
||||||
testStringmap.checkString(testString2).should.be.false();
|
|
||||||
});
|
|
||||||
it("should register a function to trigger when empty", function () {
|
|
||||||
testStringmap.registerUntilTrue(() => { return testStringmap.checkIsEmpty(); }, () => { console.log("Stringmap now is empty"); });
|
|
||||||
});
|
|
||||||
it("should remove wipe and then notify", function () {
|
|
||||||
testStringmap.wipe();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
describe("Objectmap", function () {
|
|
||||||
let testObjectmap;
|
|
||||||
let testObject1 = {
|
|
||||||
propOne: "hello",
|
|
||||||
propTwo: "hello2"
|
|
||||||
};
|
|
||||||
let testObject2 = {
|
|
||||||
propOne: "hello",
|
|
||||||
propTwo: "hello2"
|
|
||||||
};
|
|
||||||
it("should correctly instantiate an Objectmap", function () {
|
|
||||||
testObjectmap = new lik.Objectmap();
|
|
||||||
testObjectmap.should.be.instanceof(lik.Objectmap);
|
|
||||||
});
|
|
||||||
it("should correctly add an object to Objectmap", function () {
|
|
||||||
testObjectmap.add(testObject1);
|
|
||||||
testObjectmap.checkForObject(testObject1).should.be.true;
|
|
||||||
testObjectmap.checkForObject(testObject2).should.be.false;
|
|
||||||
});
|
|
||||||
it("should correctly remove an object to Objectmap", function () {
|
|
||||||
testObjectmap.add(testObject2);
|
|
||||||
testObjectmap.remove(testObject1);
|
|
||||||
testObjectmap.checkForObject(testObject1).should.be.false;
|
|
||||||
testObjectmap.checkForObject(testObject2).should.be.true;
|
|
||||||
});
|
|
||||||
it("should correctly run a function forEach map object", function () {
|
|
||||||
testObjectmap.forEach(itemArg => {
|
|
||||||
itemArg.should.have.ownProperty("propOne");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sY0FBYyxDQUFDLENBQUE7QUFDdEIsTUFBTyxHQUFHLFdBQVcsZUFBZSxDQUFDLENBQUM7QUFDdEMsUU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1lBQzFELGFBQWEsQ0FBQyxjQUFjLENBQUMsV0FBVyxDQUFDLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQyxJQUFJLENBQUM7UUFDN0QsQ0FBQyxDQUFDLENBQUM7UUFDSCxFQUFFLENBQUMsb0RBQW9ELEVBQUM7WUFDcEQsYUFBYSxDQUFDLE9BQU8sQ0FBQyxPQUFPO2dCQUN6QixPQUFPLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsU0FBUyxDQUFDLENBQUM7WUFDL0MsQ0FBQyxDQUFDLENBQUE7UUFDTixDQUFDLENBQUMsQ0FBQTtJQUNOLENBQUMsQ0FBQyxDQUFBO0FBQ04sQ0FBQyxDQUFDLENBQUMifQ==
|
|
17
test/test.limitedarray.ts
Normal file
17
test/test.limitedarray.ts
Normal 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()
|
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 * 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()
|
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 * 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()
|
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 * as lik from '../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 * 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()
|
78
test/test.ts
78
test/test.ts
@ -1,78 +0,0 @@
|
|||||||
import "typings-test";
|
|
||||||
import lik = require("../dist/index");
|
|
||||||
import "should";
|
|
||||||
|
|
||||||
describe("lik",function(){
|
|
||||||
describe("Stringmap",function(){
|
|
||||||
let testStringmap:lik.Stringmap;
|
|
||||||
let testString1 = "testString1";
|
|
||||||
let testString2 = "testString2";
|
|
||||||
let testString3 = "testString3";
|
|
||||||
it("should create an instance of Stringmap",function(){
|
|
||||||
testStringmap = new lik.Stringmap();
|
|
||||||
testStringmap.should.be.instanceof(lik.Stringmap);
|
|
||||||
});
|
|
||||||
it("should return false for an string not in Stringmap",function(){
|
|
||||||
testStringmap.checkString(testString1).should.be.false();
|
|
||||||
});
|
|
||||||
it("should add an string to Stringmap",function(){
|
|
||||||
testStringmap.addString(testString1);
|
|
||||||
testStringmap.addString(testString2);
|
|
||||||
testStringmap.addString(testString3);
|
|
||||||
testStringmap.checkString(testString1).should.be.true();
|
|
||||||
testStringmap.checkString(testString2).should.be.true();
|
|
||||||
testStringmap.checkString(testString3).should.be.true();
|
|
||||||
testStringmap.checkMinimatch("*String1").should.be.true();
|
|
||||||
testStringmap.checkMinimatch("*String2").should.be.true();
|
|
||||||
testStringmap.checkMinimatch("*String4").should.be.false();
|
|
||||||
});
|
|
||||||
it("should remove a string from Stringmap",function(){
|
|
||||||
testStringmap.removeString(testString2);
|
|
||||||
testStringmap.checkString(testString2).should.be.false();
|
|
||||||
});
|
|
||||||
it("should register a function to trigger when empty",function(){
|
|
||||||
testStringmap.registerUntilTrue(
|
|
||||||
() => {return testStringmap.checkIsEmpty()},
|
|
||||||
() => {console.log("Stringmap now is empty")}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
it("should remove wipe and then notify",function(){
|
|
||||||
testStringmap.wipe();
|
|
||||||
})
|
|
||||||
});
|
|
||||||
describe("Objectmap",function(){
|
|
||||||
interface ITestObject {
|
|
||||||
propOne:string;
|
|
||||||
propTwo:string;
|
|
||||||
}
|
|
||||||
let testObjectmap:lik.Objectmap;
|
|
||||||
let testObject1:ITestObject = {
|
|
||||||
propOne: "hello",
|
|
||||||
propTwo: "hello2"
|
|
||||||
};
|
|
||||||
let testObject2:ITestObject = {
|
|
||||||
propOne: "hello",
|
|
||||||
propTwo: "hello2"
|
|
||||||
};
|
|
||||||
it("should correctly instantiate an Objectmap",function(){
|
|
||||||
testObjectmap = new lik.Objectmap();
|
|
||||||
testObjectmap.should.be.instanceof(lik.Objectmap);
|
|
||||||
});
|
|
||||||
it("should correctly add an object to Objectmap",function(){
|
|
||||||
testObjectmap.add(testObject1);
|
|
||||||
testObjectmap.checkForObject(testObject1).should.be.true;
|
|
||||||
testObjectmap.checkForObject(testObject2).should.be.false;
|
|
||||||
});
|
|
||||||
it("should correctly remove an object to Objectmap",function(){
|
|
||||||
testObjectmap.add(testObject2);
|
|
||||||
testObjectmap.remove(testObject1);
|
|
||||||
testObjectmap.checkForObject(testObject1).should.be.false;
|
|
||||||
testObjectmap.checkForObject(testObject2).should.be.true;
|
|
||||||
});
|
|
||||||
it("should correctly run a function forEach map object",function(){
|
|
||||||
testObjectmap.forEach(itemArg => {
|
|
||||||
itemArg.should.have.ownProperty("propOne");
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
});
|
|
@ -1,6 +1,9 @@
|
|||||||
import * as plugins from "./lik.plugins";
|
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.stringmap'
|
||||||
|
export * from './lik.limitedarray'
|
||||||
|
43
ts/lik.limitedarray.ts
Normal file
43
ts/lik.limitedarray.ts
Normal 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
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)
|
||||||
|
}
|
||||||
|
}
|
@ -1,53 +1,132 @@
|
|||||||
import * as plugins from "./lik.plugins";
|
import * as plugins from './lik.plugins'
|
||||||
|
|
||||||
|
export interface IObjectmapForEachFunction<T> {
|
||||||
|
(itemArg: T): void
|
||||||
|
}
|
||||||
|
|
||||||
export interface IObjectmapForEach {
|
export interface IObjectmapFindFunction<T> {
|
||||||
(itemArg):void
|
(itemArg: T): boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* allows keeping track of objects
|
* allows keeping track of objects
|
||||||
*/
|
*/
|
||||||
export class Objectmap {
|
export class Objectmap<T> {
|
||||||
private objectArray = [];
|
private objectArray: T[] = []
|
||||||
/**
|
|
||||||
* add object to Objectmap
|
|
||||||
*/
|
|
||||||
add(objectArg){
|
|
||||||
this.objectArray.push(objectArg);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* remove object from Objectmap
|
* returns a new instance
|
||||||
*/
|
*/
|
||||||
remove(objectArg){
|
constructor () {
|
||||||
let replacmentArray = [];
|
// nothing here
|
||||||
for(let item of this.objectArray){
|
}
|
||||||
if(item !== objectArg){
|
|
||||||
replacmentArray.push(item);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.objectArray = replacmentArray;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check if object is in Objectmap
|
* add object to Objectmap
|
||||||
*/
|
* returns false if the object is already in the map
|
||||||
checkForObject(objectArg){
|
* returns true if the object was added successfully
|
||||||
return this.objectArray.indexOf(objectArg !== -1)
|
*/
|
||||||
};
|
add (objectArg: T): boolean {
|
||||||
|
if (this.checkForObject(objectArg)) {
|
||||||
/**
|
// the object is already in the objectmap
|
||||||
* run function for each item in Objectmap
|
return false
|
||||||
*/
|
} else {
|
||||||
forEach(functionArg:IObjectmapForEach){
|
// the object is not yet in the objectmap
|
||||||
return this.objectArray.forEach(functionArg);
|
this.objectArray.push(objectArg)
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wipe Objectmap
|
* like .add but adds an whole array of objects
|
||||||
*/
|
*/
|
||||||
wipe(){
|
addArray (objectArrayArg: T[]) {
|
||||||
this.objectArray = [];
|
for (let item of objectArrayArg) {
|
||||||
|
this.add(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check if object is in Objectmap
|
||||||
|
*/
|
||||||
|
checkForObject (objectArg: T) {
|
||||||
|
return this.objectArray.indexOf(objectArg) !== -1
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* find object
|
||||||
|
*/
|
||||||
|
find (findFunction: IObjectmapFindFunction<T>) {
|
||||||
|
let resultArray = this.objectArray.filter(findFunction)
|
||||||
|
if (resultArray.length > 0) {
|
||||||
|
return resultArray[ 0 ]
|
||||||
|
} else {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* finds a specific element and then removes it
|
||||||
|
*/
|
||||||
|
findOneAndRemove (findFunction: IObjectmapFindFunction<T>): T {
|
||||||
|
let foundElement = this.find(findFunction)
|
||||||
|
if (foundElement) {
|
||||||
|
this.remove(foundElement)
|
||||||
|
}
|
||||||
|
return foundElement
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* run function for each item in Objectmap
|
||||||
|
*/
|
||||||
|
async forEach (functionArg: IObjectmapForEachFunction<T>) {
|
||||||
|
for (let object of this.objectArray) {
|
||||||
|
await functionArg(object)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gets an object in the Observablemap and removes it, so it can't be retrieved again
|
||||||
|
*/
|
||||||
|
getOneAndRemove (): T {
|
||||||
|
return this.objectArray.shift()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns a cloned array of all the objects currently in the Objectmap
|
||||||
|
*/
|
||||||
|
getArray () {
|
||||||
|
return plugins.lodash.cloneDeep(this.objectArray)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check if Objectmap ist empty
|
||||||
|
*/
|
||||||
|
isEmpty (): boolean {
|
||||||
|
if (this.objectArray.length === 0) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* remove object from Objectmap
|
||||||
|
*/
|
||||||
|
remove (objectArg: T) {
|
||||||
|
let replacementArray = []
|
||||||
|
for (let item of this.objectArray) {
|
||||||
|
if (item !== objectArg) {
|
||||||
|
replacementArray.push(item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.objectArray = replacementArray
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wipe Objectmap
|
||||||
|
*/
|
||||||
|
wipe () {
|
||||||
|
this.objectArray = []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
41
ts/lik.observablemap.ts
Normal file
41
ts/lik.observablemap.ts
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,15 @@
|
|||||||
import "typings-global";
|
import 'typings-global'
|
||||||
export import q = require("q");
|
export import q = require('q')
|
||||||
export import minimatch = require("minimatch");
|
export import events = require('events')
|
||||||
|
export import lodash = require('lodash')
|
||||||
|
export import minimatch = require('minimatch')
|
||||||
|
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>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,99 +1,114 @@
|
|||||||
import * as plugins from "./lik.plugins";
|
import * as plugins from './lik.plugins'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* allows you to easily keep track of a bunch of strings;
|
* allows you to easily keep track of a bunch of strings
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export interface triggerFunction {
|
export interface ITriggerFunction {
|
||||||
():boolean;
|
(): boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Stringmap {
|
export class Stringmap {
|
||||||
private _stringArray:string[] = [];
|
private _stringArray: string[] = []
|
||||||
private _triggerUntilTrueFunctionArray:triggerFunction[] = [];
|
private _triggerUntilTrueFunctionArray: ITriggerFunction[] = []
|
||||||
constructor(){
|
constructor() { }
|
||||||
|
/**
|
||||||
|
* add a string to the Stringmap
|
||||||
|
*/
|
||||||
|
addString (stringArg: string) {
|
||||||
|
this._stringArray.push(stringArg)
|
||||||
|
this.notifyTrigger()
|
||||||
|
}
|
||||||
|
|
||||||
};
|
/**
|
||||||
/**
|
* like addString, but accepts an array of strings
|
||||||
* add a string to the Stringmap
|
*/
|
||||||
*/
|
addStringArray (stringArrayArg: string[]) {
|
||||||
addString(stringArg:string){
|
for (let stringItem of stringArrayArg) {
|
||||||
this._stringArray.push(stringArg);
|
this.addString(stringItem)
|
||||||
this.notifyTrigger();
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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
|
* removes a string from Stringmap
|
||||||
*/
|
*/
|
||||||
wipe(){
|
removeString (stringArg: string) {
|
||||||
this._stringArray = [];
|
for (let keyArg in this._stringArray) {
|
||||||
this.notifyTrigger();
|
if (this._stringArray[ keyArg ] === stringArg) {
|
||||||
|
this._stringArray.splice(parseInt(keyArg), 1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
this.notifyTrigger()
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check if string is in Stringmap
|
* wipes the Stringmap
|
||||||
*/
|
*/
|
||||||
checkString(stringArg:string):boolean {
|
wipe () {
|
||||||
return this._stringArray.indexOf(stringArg) != -1;
|
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 stringPresence with minimatch
|
* checks if the Stringmap is empty
|
||||||
*/
|
*/
|
||||||
checkMinimatch(miniMatchStringArg:string):boolean {
|
checkIsEmpty () {
|
||||||
let foundMatch:boolean = false;
|
return (this._stringArray.length === 0)
|
||||||
for(let stringItem of this._stringArray){
|
}
|
||||||
if(plugins.minimatch(stringItem,miniMatchStringArg)){
|
|
||||||
foundMatch = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
return foundMatch;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* checks if the Stringmap is empty
|
* gets a cloned copy of the current string Array
|
||||||
*/
|
*/
|
||||||
checkIsEmpty(){
|
getStringArray () {
|
||||||
return (this._stringArray.length === 0);
|
return plugins.lodash.cloneDeep(this._stringArray)
|
||||||
}
|
}
|
||||||
|
|
||||||
// trigger registering
|
// trigger registering
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* notifies triggers
|
* register a new trigger
|
||||||
*/
|
*/
|
||||||
private notifyTrigger(){
|
registerUntilTrue (functionArg: ITriggerFunction, doFunctionArg) {
|
||||||
let filteredArray = this._triggerUntilTrueFunctionArray.filter((functionArg) => {
|
this._triggerUntilTrueFunctionArray.push(
|
||||||
return !functionArg();
|
() => {
|
||||||
});
|
let result = functionArg()
|
||||||
this._triggerUntilTrueFunctionArray = filteredArray;
|
if (result === true) {
|
||||||
};
|
doFunctionArg()
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
)
|
||||||
|
this.notifyTrigger()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* notifies triggers
|
||||||
|
*/
|
||||||
|
private notifyTrigger () {
|
||||||
|
let filteredArray = this._triggerUntilTrueFunctionArray.filter((functionArg) => {
|
||||||
|
return !functionArg()
|
||||||
|
})
|
||||||
|
this._triggerUntilTrueFunctionArray = filteredArray
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
}
|
||||||
* register a new trigger
|
|
||||||
*/
|
|
||||||
registerUntilTrue(functionArg:triggerFunction,doFunctionArg){
|
|
||||||
this._triggerUntilTrueFunctionArray.push(
|
|
||||||
() => {
|
|
||||||
let result = functionArg();
|
|
||||||
if(result === true){
|
|
||||||
doFunctionArg();
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
this.notifyTrigger();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
3
tslint.json
Normal file
3
tslint.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"extends": "tslint-config-standard"
|
||||||
|
}
|
412
yarn.lock
Normal file
412
yarn.lock
Normal file
@ -0,0 +1,412 @@
|
|||||||
|
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||||
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
"@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:
|
||||||
|
"@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/q@1.x.x":
|
||||||
|
version "1.0.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.0.5.tgz#02b9d43a1a8e7503d15ed2fecb15ebb18c519b1d"
|
||||||
|
|
||||||
|
"@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.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.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"
|
||||||
|
dependencies:
|
||||||
|
once "^1.3.0"
|
||||||
|
wrappy "1"
|
||||||
|
|
||||||
|
inherits@2:
|
||||||
|
version "2.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||||
|
|
||||||
|
interpret@^1.0.0:
|
||||||
|
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"
|
||||||
|
|
||||||
|
memwatch-next@^0.3.0:
|
||||||
|
version "0.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/memwatch-next/-/memwatch-next-0.3.0.tgz#2111050f9a906e0aa2d72a4ec0f0089c78726f8f"
|
||||||
|
dependencies:
|
||||||
|
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"
|
||||||
|
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||||
|
dependencies:
|
||||||
|
wrappy "1"
|
||||||
|
|
||||||
|
path-is-absolute@^1.0.0:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||||
|
|
||||||
|
path-parse@^1.0.5:
|
||||||
|
version "1.0.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
|
||||||
|
|
||||||
|
pretty-bytes@^4.0.2:
|
||||||
|
version "4.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
|
||||||
|
|
||||||
|
q@^1.5.0:
|
||||||
|
version "1.5.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1"
|
||||||
|
|
||||||
|
rechoir@^0.6.2:
|
||||||
|
version "0.6.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
|
||||||
|
dependencies:
|
||||||
|
resolve "^1.1.6"
|
||||||
|
|
||||||
|
resolve@^1.1.6:
|
||||||
|
version "1.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86"
|
||||||
|
dependencies:
|
||||||
|
path-parse "^1.0.5"
|
||||||
|
|
||||||
|
rxjs@^5.4.3:
|
||||||
|
version "5.4.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.3.tgz#0758cddee6033d68e0fd53676f0f3596ce3d483f"
|
||||||
|
dependencies:
|
||||||
|
symbol-observable "^1.0.1"
|
||||||
|
|
||||||
|
semver@^5.3.0:
|
||||||
|
version "5.4.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
smartchai@^1.0.3:
|
||||||
|
version "1.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartchai/-/smartchai-1.0.3.tgz#de6d010bb8b5aef24cb70b31a5f5334e8c41b72f"
|
||||||
|
dependencies:
|
||||||
|
"@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"
|
||||||
|
|
||||||
|
smartdelay@^1.0.3:
|
||||||
|
version "1.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.3.tgz#5fd44dad77262d110702f0293efa80c072cfb579"
|
||||||
|
dependencies:
|
||||||
|
smartq "^1.1.1"
|
||||||
|
typings-global "^1.0.16"
|
||||||
|
|
||||||
|
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:
|
||||||
|
typings-global "^1.0.19"
|
||||||
|
util.promisify "^1.0.0"
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
symbol-observable@^1.0.1:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d"
|
||||||
|
|
||||||
|
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/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
|
||||||
|
|
||||||
|
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"
|
||||||
|
smartshell "^1.0.6"
|
||||||
|
|
||||||
|
util.promisify@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030"
|
||||||
|
dependencies:
|
||||||
|
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"
|
||||||
|
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
Reference in New Issue
Block a user