Compare commits

...

10 Commits

Author SHA1 Message Date
e1442b1bc8 3.0.13 2019-11-27 23:15:14 +00:00
2ca9e14f76 fix(core): update 2019-11-27 23:15:13 +00:00
e65f36dfa2 3.0.12 2019-11-27 23:00:16 +00:00
adb95cd683 fix(dependencies): update 2019-11-27 23:00:15 +00:00
d2106690b4 3.0.11 2019-08-25 15:58:01 +02:00
2ea5111eb8 fix(core): update 2019-08-25 15:58:00 +02:00
aae10344fe 3.0.10 2019-08-02 16:57:45 +02:00
52b65d7dc3 3.0.9 2019-08-02 16:48:30 +02:00
1135b418cb 3.0.8 2019-08-02 16:38:09 +02:00
2eb1dbd0b3 fix(core): update 2019-08-02 16:38:08 +02:00
5 changed files with 904 additions and 573 deletions

View File

@ -1,5 +1,7 @@
# gitzone ci_default
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
variables:
GIT_STRATEGY: clone
cache:
paths:
@ -38,17 +40,17 @@ snyk:
# test stage
# ====================
testLTS:
testStable:
stage: test
script:
- npmci npm prepare
- npmci node install lts
- npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
- priv
testBuild:
stage: test

View File

@ -38,6 +38,6 @@ Objectmap takes care of keeping track of objects for you.
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)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com)
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)

1403
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/lik",
"version": "3.0.7",
"version": "3.0.13",
"private": false,
"description": "light little helpers for node",
"main": "dist/index.js",
@ -20,22 +20,22 @@
},
"homepage": "https://gitlab.com/pushrocks/lik#README",
"devDependencies": {
"@gitzone/tsbuild": "^2.1.3",
"@gitzone/tsrun": "^1.1.17",
"@gitzone/tstest": "^1.0.18",
"@pushrocks/tapbundle": "^3.0.7",
"@types/node": "^10.12.12",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.17.0"
"@gitzone/tsbuild": "^2.1.17",
"@gitzone/tsrun": "^1.2.8",
"@gitzone/tstest": "^1.0.28",
"@pushrocks/tapbundle": "^3.2.0",
"@types/node": "^12.12.14",
"tslint": "^5.20.1",
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {
"@pushrocks/smartdelay": "^2.0.2",
"@pushrocks/smartpromise": "^2.0.5",
"@pushrocks/smartrx": "^2.0.3",
"@pushrocks/smarttime": "^3.0.5",
"@pushrocks/smartdelay": "^2.0.6",
"@pushrocks/smartpromise": "^3.0.6",
"@pushrocks/smartrx": "^2.0.5",
"@pushrocks/smarttime": "^3.0.12",
"@types/minimatch": "^3.0.3",
"minimatch": "^3.0.4",
"symbol-tree": "^3.2.2"
"symbol-tree": "^3.2.4"
},
"files": [
"ts/*",

View File

@ -14,6 +14,9 @@ export interface IObjectmapFindFunction<T> {
export class Objectmap<T> {
private objectArray: T[] = [];
// events
public eventSubject = new plugins.smartrx.rxjs.Subject<any>();
/**
* returns a new instance
*/
@ -33,6 +36,7 @@ export class Objectmap<T> {
} else {
// the object is not yet in the objectmap
this.objectArray.push(objectArg);
this.eventSubject.next('add');
return true;
}
}
@ -89,7 +93,9 @@ export class Objectmap<T> {
* gets an object in the Observablemap and removes it, so it can't be retrieved again
*/
public getOneAndRemove(): T {
return this.objectArray.shift();
const removedItem = this.objectArray.shift();
this.eventSubject.next('remove');
return removedItem;
}
/**
@ -125,6 +131,7 @@ export class Objectmap<T> {
}
}
this.objectArray = replacementArray;
this.eventSubject.next('remove');
}
/**
@ -132,5 +139,6 @@ export class Objectmap<T> {
*/
public wipe() {
this.objectArray = [];
this.eventSubject.next('wiped');
}
}