Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
f84822dd5d | |||
21d6e19a22 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/lik",
|
||||
"version": "4.0.20",
|
||||
"version": "4.0.21",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/lik",
|
||||
"version": "4.0.20",
|
||||
"version": "4.0.21",
|
||||
"private": false,
|
||||
"description": "light little helpers for node",
|
||||
"main": "dist_ts/index.js",
|
||||
|
@ -29,7 +29,7 @@ export class FastMap<T> {
|
||||
return this.mapObject[keyArg];
|
||||
}
|
||||
|
||||
public removeFromMap(keyArg): T {
|
||||
public removeFromMap(keyArg: string): T {
|
||||
const removedItem = this.getByKey(keyArg);
|
||||
delete this.mapObject[keyArg];
|
||||
return removedItem;
|
||||
@ -50,7 +50,7 @@ export class FastMap<T> {
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a new Objectmap that includes
|
||||
* returns a new Fastmap that includes all values from this and all from the fastmap in the argument
|
||||
*/
|
||||
public concat(fastMapArg: FastMap<T>) {
|
||||
const concatedFastmap = new FastMap<T>();
|
||||
@ -68,9 +68,9 @@ export class FastMap<T> {
|
||||
}
|
||||
|
||||
/**
|
||||
* tries to merge another Objectmap
|
||||
* tries to merge another Fastmap
|
||||
* Note: uniqueKeyCollisions will cause overwrite
|
||||
* @param objectMapArg
|
||||
* @param fastMapArg
|
||||
*/
|
||||
public addAllFromOther(fastMapArg: FastMap<T>) {
|
||||
for (const key of fastMapArg.getKeys()) {
|
||||
@ -79,4 +79,10 @@ export class FastMap<T> {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public async find(findFunction: (mapItemArg: T) => Promise<boolean>) {
|
||||
for (const key of this.getKeys()) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user