@pushrocks/lik
Advanced tools
Comparing version 3.0.13 to 3.0.14
@@ -12,2 +12,3 @@ import * as plugins from './lik.plugins'; | ||
export declare class Objectmap<T> { | ||
private fastMap; | ||
private objectArray; | ||
@@ -20,2 +21,17 @@ eventSubject: plugins.smartrx.rxjs.Subject<any>; | ||
/** | ||
* adds an object mapped to a string | ||
* the string must be unique | ||
*/ | ||
addMappedUnique(uniqueKey: string, objectArg: T): void; | ||
/** | ||
* fastest way to get an object from the map | ||
* @param uniqueKey | ||
*/ | ||
getMappedUnique(uniqueKey: string): void; | ||
/** | ||
* remove key | ||
* @param functionArg | ||
*/ | ||
removeMappedUnique(): void; | ||
/** | ||
* add object to Objectmap | ||
@@ -22,0 +38,0 @@ * returns false if the object is already in the map |
@@ -11,2 +11,3 @@ "use strict"; | ||
const plugins = __importStar(require("./lik.plugins")); | ||
const lik_fastmap_1 = require("./lik.fastmap"); | ||
/** | ||
@@ -20,2 +21,3 @@ * allows keeping track of objects | ||
constructor() { | ||
this.fastMap = new lik_fastmap_1.FastMap(); | ||
this.objectArray = []; | ||
@@ -27,2 +29,20 @@ // events | ||
/** | ||
* adds an object mapped to a string | ||
* the string must be unique | ||
*/ | ||
addMappedUnique(uniqueKey, objectArg) { | ||
this.add(objectArg); | ||
this.fastMap.addToMap(uniqueKey, objectArg); | ||
} | ||
/** | ||
* fastest way to get an object from the map | ||
* @param uniqueKey | ||
*/ | ||
getMappedUnique(uniqueKey) { } | ||
/** | ||
* remove key | ||
* @param functionArg | ||
*/ | ||
removeMappedUnique() { } | ||
/** | ||
* add object to Objectmap | ||
@@ -139,2 +159,2 @@ * returns false if the object is already in the map | ||
exports.Objectmap = Objectmap; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlrLm9iamVjdG1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2xpay5vYmplY3RtYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW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Y7QUF4SkQsOEJBd0pDIn0= |
@@ -27,3 +27,3 @@ "use strict"; | ||
addStringArray(stringArrayArg) { | ||
for (let stringItem of stringArrayArg) { | ||
for (const stringItem of stringArrayArg) { | ||
this.addString(stringItem); | ||
@@ -36,3 +36,3 @@ } | ||
removeString(stringArg) { | ||
for (let keyArg in this._stringArray) { | ||
for (const keyArg in this._stringArray) { | ||
if (this._stringArray[keyArg] === stringArg) { | ||
@@ -62,3 +62,3 @@ this._stringArray.splice(parseInt(keyArg), 1); | ||
let foundMatch = false; | ||
for (let stringItem of this._stringArray) { | ||
for (const stringItem of this._stringArray) { | ||
if (plugins.minimatch(stringItem, miniMatchStringArg)) { | ||
@@ -92,3 +92,3 @@ foundMatch = true; | ||
this._triggerUntilTrueFunctionArray.push(() => { | ||
let result = functionArg(); | ||
const result = functionArg(); | ||
if (result === true) { | ||
@@ -105,3 +105,3 @@ doFunctionArg(); | ||
notifyTrigger() { | ||
let filteredArray = this._triggerUntilTrueFunctionArray.filter(functionArg => { | ||
const filteredArray = this._triggerUntilTrueFunctionArray.filter(functionArg => { | ||
return !functionArg(); | ||
@@ -113,2 +113,2 @@ }); | ||
exports.Stringmap = Stringmap; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlrLnN0cmluZ21hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2xpay5zdHJpbmdtYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUEsdURBQXlDO0FBVXpDLE1BQWEsU0FBUztJQUdwQjtRQUZRLGlCQUFZLEdBQWEsRUFBRSxDQUFDO1FBQzVCLG1DQUE4QixHQUF1QixFQUFFLENBQUM7SUFDakQsQ0FBQztJQUNoQjs7T0FFRztJQUNILFNBQVMsQ0FBQyxTQUFpQjtRQUN6QixJQUFJLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQ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QUE2QixFQUFFLGFBQWE7UUFDbkUsSUFBSSxDQUFDLDhCQUE4QixDQUFDLElBQUksQ0FBQyxHQUFHLEVBQUU7WUFDNUMsTUFBTSxNQUFNLEdBQUcsV0FBVyxFQUFFLENBQUM7WUFDN0IsSUFBSSxNQUFNLEtBQUssSUFBSSxFQUFFO2dCQUNuQixhQUFhLEVBQUUsQ0FBQzthQUNqQjtZQUNELE9BQU8sTUFBTSxDQUFDO1FBQ2hCLENBQUMsQ0FBQyxDQUFDO1FBQ0gsSUFBSSxDQUFDLGFBQWEsRUFBRSxDQUFDO0lBQ3ZCLENBQUM7SUFFRDs7T0FFRztJQUNLLGFBQWE7UUFDbkIsTUFBTSxhQUFhLEdBQUcsSUFBSSxDQUFDLDhCQUE4QixDQUFDLE1BQU0sQ0FBQyxXQUFXLENBQUMsRUFBRTtZQUM3RSxPQUFPLENBQUMsV0FBVyxFQUFFLENBQUM7UUFDeEIsQ0FBQyxDQUFDLENBQUM7UUFDSCxJQUFJLENBQUMsOEJBQThCLEdBQUcsYUFBYSxDQUFDO0lBQ3RELENBQUM7Q0FDRjtBQXhHRCw4QkF3R0MifQ== |
@@ -7,2 +7,3 @@ { | ||
"gitzone": { | ||
"projectType": "npm", | ||
"module": { | ||
@@ -9,0 +10,0 @@ "githost": "gitlab.com", |
{ | ||
"name": "@pushrocks/lik", | ||
"version": "3.0.13", | ||
"version": "3.0.14", | ||
"private": false, | ||
@@ -27,4 +27,4 @@ "description": "light little helpers for node", | ||
"@pushrocks/tapbundle": "^3.2.0", | ||
"@types/node": "^12.12.14", | ||
"tslint": "^5.20.1", | ||
"@types/node": "^13.7.0", | ||
"tslint": "^6.0.0", | ||
"tslint-config-prettier": "^1.18.0" | ||
@@ -42,8 +42,8 @@ }, | ||
"files": [ | ||
"ts/*", | ||
"ts_web/*", | ||
"dist/*", | ||
"dist_web/*", | ||
"dist_ts_web/*", | ||
"assets/*", | ||
"ts/**/*", | ||
"ts_web/**/*", | ||
"dist/**/*", | ||
"dist_web/**/*", | ||
"dist_ts_web/**/*", | ||
"assets/**/*", | ||
"cli.js", | ||
@@ -50,0 +50,0 @@ "npmextra.json", |
import * as plugins from './lik.plugins'; | ||
import { FastMap } from './lik.fastmap'; | ||
@@ -15,2 +16,3 @@ export interface IObjectmapForEachFunction<T> { | ||
export class Objectmap<T> { | ||
private fastMap = new FastMap<T>(); | ||
private objectArray: T[] = []; | ||
@@ -29,2 +31,23 @@ | ||
/** | ||
* adds an object mapped to a string | ||
* the string must be unique | ||
*/ | ||
addMappedUnique(uniqueKey: string, objectArg: T) { | ||
this.add(objectArg); | ||
this.fastMap.addToMap(uniqueKey, objectArg); | ||
} | ||
/** | ||
* fastest way to get an object from the map | ||
* @param uniqueKey | ||
*/ | ||
public getMappedUnique(uniqueKey: string) {} | ||
/** | ||
* remove key | ||
* @param functionArg | ||
*/ | ||
public removeMappedUnique() {} | ||
/** | ||
* add object to Objectmap | ||
@@ -31,0 +54,0 @@ * returns false if the object is already in the map |
@@ -27,3 +27,3 @@ import * as plugins from './lik.plugins'; | ||
addStringArray(stringArrayArg: string[]) { | ||
for (let stringItem of stringArrayArg) { | ||
for (const stringItem of stringArrayArg) { | ||
this.addString(stringItem); | ||
@@ -37,3 +37,3 @@ } | ||
removeString(stringArg: string) { | ||
for (let keyArg in this._stringArray) { | ||
for (const keyArg in this._stringArray) { | ||
if (this._stringArray[keyArg] === stringArg) { | ||
@@ -66,3 +66,3 @@ this._stringArray.splice(parseInt(keyArg), 1); | ||
let foundMatch: boolean = false; | ||
for (let stringItem of this._stringArray) { | ||
for (const stringItem of this._stringArray) { | ||
if (plugins.minimatch(stringItem, miniMatchStringArg)) { | ||
@@ -100,3 +100,3 @@ foundMatch = true; | ||
this._triggerUntilTrueFunctionArray.push(() => { | ||
let result = functionArg(); | ||
const result = functionArg(); | ||
if (result === true) { | ||
@@ -114,3 +114,3 @@ doFunctionArg(); | ||
private notifyTrigger() { | ||
let filteredArray = this._triggerUntilTrueFunctionArray.filter(functionArg => { | ||
const filteredArray = this._triggerUntilTrueFunctionArray.filter(functionArg => { | ||
return !functionArg(); | ||
@@ -117,0 +117,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71696
35
1683
1
0