ismx-nexo-node-app 0.4.113 → 0.4.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,12 +2,8 @@
|
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Hash = void 0;
|
|
5
|
-
class Hash
|
|
6
|
-
get size() {
|
|
7
|
-
return Object.keys(this.dict).length;
|
|
8
|
-
}
|
|
5
|
+
class Hash {
|
|
9
6
|
constructor(dict) {
|
|
10
|
-
super();
|
|
11
7
|
this[_a] = "Hash";
|
|
12
8
|
this.dict = dict !== null && dict !== void 0 ? dict : {};
|
|
13
9
|
}
|
|
@@ -22,19 +18,16 @@ class Hash extends Set {
|
|
|
22
18
|
return delete this.dict[value];
|
|
23
19
|
}
|
|
24
20
|
forEach(callbackfn, thisArg) {
|
|
25
|
-
return Object.keys(this.dict).forEach((v) => callbackfn(v,
|
|
21
|
+
return Object.keys(this.dict).forEach((v) => callbackfn(v, this), thisArg);
|
|
22
|
+
}
|
|
23
|
+
size() {
|
|
24
|
+
return Object.keys(this.dict).length;
|
|
26
25
|
}
|
|
27
26
|
has(value) {
|
|
28
27
|
return value in this.dict;
|
|
29
28
|
}
|
|
30
|
-
entries() {
|
|
31
|
-
return Object.entries(this.dict);
|
|
32
|
-
}
|
|
33
29
|
keys() {
|
|
34
|
-
return Object.keys(this.dict).
|
|
35
|
-
}
|
|
36
|
-
values() {
|
|
37
|
-
return Object.keys(this.dict).values();
|
|
30
|
+
return Object.keys(this.dict).keys();
|
|
38
31
|
}
|
|
39
32
|
[Symbol.iterator]() {
|
|
40
33
|
return Object.keys(this.dict)[Symbol.iterator]();
|
|
@@ -3,18 +3,16 @@ export interface Pagination<T> {
|
|
|
3
3
|
elements: T[];
|
|
4
4
|
}
|
|
5
5
|
export type Transient<T> = Omit<T, 'id'>;
|
|
6
|
-
export declare class Hash<T extends string | number | symbol>
|
|
6
|
+
export declare class Hash<T extends string | number | symbol> {
|
|
7
7
|
dict: Record<T, any>;
|
|
8
|
-
get size(): number;
|
|
9
8
|
constructor(dict?: Record<T, any>);
|
|
10
9
|
add(value: T): this;
|
|
11
10
|
clear(): void;
|
|
12
11
|
delete(value: T): boolean;
|
|
13
|
-
forEach(callbackfn: (value: T,
|
|
12
|
+
forEach(callbackfn: (value: T, hash: Hash<T>) => void, thisArg?: any): void;
|
|
13
|
+
size(): number;
|
|
14
14
|
has(value: T): boolean;
|
|
15
|
-
entries(): SetIterator<[T, T]>;
|
|
16
15
|
keys(): SetIterator<T>;
|
|
17
|
-
values(): SetIterator<T>;
|
|
18
16
|
[Symbol.iterator](): SetIterator<T>;
|
|
19
17
|
[Symbol.toStringTag]: string;
|
|
20
18
|
}
|
package/package.json
CHANGED
|
@@ -5,16 +5,11 @@ export interface Pagination<T> {
|
|
|
5
5
|
|
|
6
6
|
export type Transient<T> = Omit<T, 'id'>
|
|
7
7
|
|
|
8
|
-
export class Hash<T extends string | number | symbol>
|
|
8
|
+
export class Hash<T extends string | number | symbol>
|
|
9
9
|
{
|
|
10
10
|
dict: Record<T, any>
|
|
11
11
|
|
|
12
|
-
get size(): number {
|
|
13
|
-
return Object.keys(this.dict).length;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
12
|
constructor(dict?: Record<T, any>) {
|
|
17
|
-
super()
|
|
18
13
|
this.dict = dict ?? {} as Record<T, any>;
|
|
19
14
|
}
|
|
20
15
|
|
|
@@ -22,26 +17,24 @@ export class Hash<T extends string | number | symbol> extends Set<T>
|
|
|
22
17
|
this.dict[value] = null;
|
|
23
18
|
return this;
|
|
24
19
|
}
|
|
20
|
+
|
|
25
21
|
clear(): void {
|
|
26
22
|
this.dict = {} as Record<T, any>;
|
|
27
23
|
}
|
|
28
24
|
delete(value: T): boolean {
|
|
29
25
|
return delete this.dict[value];
|
|
30
26
|
}
|
|
31
|
-
forEach(callbackfn: (value: T,
|
|
32
|
-
return Object.keys(this.dict).forEach((v) => callbackfn(v as T,
|
|
27
|
+
forEach(callbackfn: (value: T, hash: Hash<T>) => void, thisArg?: any): void {
|
|
28
|
+
return Object.keys(this.dict).forEach((v) => callbackfn(v as T, this), thisArg);
|
|
29
|
+
}
|
|
30
|
+
size(): number {
|
|
31
|
+
return Object.keys(this.dict).length;
|
|
33
32
|
}
|
|
34
33
|
has(value: T): boolean {
|
|
35
34
|
return value in this.dict;
|
|
36
35
|
}
|
|
37
|
-
entries(): SetIterator<[T, T]> {
|
|
38
|
-
return Object.entries(this.dict) as unknown as SetIterator<[T, T]>;
|
|
39
|
-
}
|
|
40
36
|
keys(): SetIterator<T> {
|
|
41
|
-
return Object.keys(this.dict).
|
|
42
|
-
}
|
|
43
|
-
values(): SetIterator<T> {
|
|
44
|
-
return Object.keys(this.dict).values() as SetIterator<T>;
|
|
37
|
+
return Object.keys(this.dict).keys() as SetIterator<T>;
|
|
45
38
|
}
|
|
46
39
|
[Symbol.iterator](): SetIterator<T> {
|
|
47
40
|
return (Object.keys(this.dict) as T[])[Symbol.iterator]()
|