ismx-nexo-node-app 0.4.109 → 0.4.111

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,9 +2,10 @@
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Hash = void 0;
5
- class Hash {
5
+ class Hash extends Set {
6
6
  constructor(dict) {
7
- this.size = null;
7
+ super();
8
+ this.size = 0;
8
9
  this[_a] = "Hash";
9
10
  this.dict = dict !== null && dict !== void 0 ? dict : {};
10
11
  }
@@ -22,7 +23,7 @@ class Hash {
22
23
  return Object.keys(this.dict).forEach((v) => callbackfn(v, v, this), thisArg);
23
24
  }
24
25
  has(value) {
25
- return !!this.dict[value];
26
+ return value in this.dict;
26
27
  }
27
28
  entries() {
28
29
  return Object.entries(this.dict);
@@ -3,7 +3,7 @@ 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> implements Set<T> {
6
+ export declare class Hash<T extends string | number | symbol> extends Set<T> {
7
7
  dict: Record<T, any>;
8
8
  size: number;
9
9
  constructor(dict?: Record<T, any>);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ismx-nexo-node-app",
3
- "version": "0.4.109",
3
+ "version": "0.4.111",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "rm -rf ./dist && npx tsc",
@@ -5,12 +5,13 @@ 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> implements Set<T>
8
+ export class Hash<T extends string | number | symbol> extends Set<T>
9
9
  {
10
10
  dict: Record<T, any>
11
- size: number = null!;
11
+ size: number = 0;
12
12
 
13
13
  constructor(dict?: Record<T, any>) {
14
+ super()
14
15
  this.dict = dict ?? {} as Record<T, any>;
15
16
  }
16
17
 
@@ -28,7 +29,7 @@ export class Hash<T extends string | number | symbol> implements Set<T>
28
29
  return Object.keys(this.dict).forEach((v) => callbackfn(v as T, v as T, this), thisArg);
29
30
  }
30
31
  has(value: T): boolean {
31
- return !!this.dict[value];
32
+ return value in this.dict;
32
33
  }
33
34
  entries(): SetIterator<[T, T]> {
34
35
  return Object.entries(this.dict) as unknown as SetIterator<[T, T]>;