j-templates 7.0.29 → 7.0.30

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.
@@ -1,6 +1,6 @@
1
1
  export type DistinctArray<T> = {
2
2
  id: (value: T) => number;
3
- distinct: Set<number> | null;
3
+ distinct: Array<true | undefined> | null;
4
4
  array: T[];
5
5
  };
6
6
  export declare namespace DistinctArray {
@@ -18,13 +18,15 @@ var DistinctArray;
18
18
  array.push(value);
19
19
  break;
20
20
  case 1: {
21
- distinctArr.distinct = new Set();
22
- distinctArr.distinct.add(id(array[0]));
21
+ if (distinctArr.distinct === null) {
22
+ distinctArr.distinct = [];
23
+ distinctArr.distinct[id(array[0])] = true;
24
+ }
23
25
  }
24
26
  default: {
25
27
  const vId = id(value);
26
- if (!distinctArr.distinct.has(vId)) {
27
- distinctArr.distinct.add(vId);
28
+ if (distinctArr.distinct[vId] === undefined) {
29
+ distinctArr.distinct[vId] = true;
28
30
  array.push(value);
29
31
  }
30
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "j-templates",
3
- "version": "7.0.29",
3
+ "version": "7.0.30",
4
4
  "description": "j-templates",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/TypesInCode/jTemplates",