@woosh/meep-engine 2.93.1 → 2.93.2

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.
@@ -60511,54 +60511,21 @@ class HashMap {
60511
60511
  *
60512
60512
  * @returns {Iterator<V>}
60513
60513
  */
60514
- values() {
60515
- const entryIterator = this[Symbol.iterator]();
60516
-
60517
- return {
60518
- next() {
60519
- const n = entryIterator.next();
60520
-
60521
- if (n.done) {
60522
- return {
60523
- done: true,
60524
- value: undefined
60525
- };
60526
- } else {
60527
- return {
60528
- done: false,
60529
- value: n.value[1]
60530
- };
60531
- }
60514
+ * values() {
60532
60515
 
60533
- }
60534
- };
60516
+ for (const [k, v] of this) {
60517
+ yield v;
60518
+ }
60535
60519
  }
60536
60520
 
60537
60521
  /**
60538
60522
  *
60539
60523
  * @returns {Iterator<K>}
60540
60524
  */
60541
- keys() {
60542
- const entryIterator = this[Symbol.iterator]();
60543
-
60544
- return {
60545
- next() {
60546
- const n = entryIterator.next();
60547
-
60548
- if (n.done) {
60549
- return {
60550
- done: true,
60551
- value: undefined
60552
- };
60553
- } else {
60554
- return {
60555
- done: false,
60556
- value: n.value[0]
60557
- };
60558
- }
60559
-
60560
- }
60561
- };
60525
+ * keys() {
60526
+ for (const [k, v] of this) {
60527
+ yield k;
60528
+ }
60562
60529
  }
60563
60530
  }
60564
60531
 
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.93.1",
8
+ "version": "2.93.2",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -1 +1 @@
1
- {"version":3,"file":"HashMap.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/map/HashMap.js"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;GAYG;AACH,uFAIC;AAsHD;;;;;;;GAOG;AACH;IA2DI;;;;;;OAMG;IACH,4FALuB,MAAM,EAsC5B;IAlBG;;;;;OAKG;IACH,iCAAsC;IACtC;;;;;OAKG;IACH,qCAA8C;IAOlD,mBAEC;IAED;;;OAGG;IACH,kBAFa,MAAM,CAIlB;IA2HD;;;;OAIG;IACH,SAHW,CAAC,SACD,CAAC,QAoEX;IAED;;;;OAIG;IACH,SAHW,CAAC,GACC,CAAC,GAAC,SAAS,CA+BvB;IAED;;;;;;;;OAQG;IACH,kBALW,CAAC,kBACQ,CAAC,KAAE,CAAC,0BAEZ,CAAC,CAcZ;IAED;;;;;OAKG;IACH,cAJW,CAAC,SACD,CAAC,GACA,CAAC,CAYZ;IAuBD;;;;OAIG;IACH,YAHW,CAAC,GACC,OAAO,CA+CnB;IAED;;;;;OAKG;IACH,4CAFa,OAAO,CA+BnB;IAOD;;OAEG;IACH,gBAkDC;IAmBD,2CAwBC;IAED;;;;OAIG;IACH,SAHW,CAAC,GACC,OAAO,CAInB;IAED;;OAEG;IACH,cA6BC;IA+BD;;;OAGG;IACH,UAFa,SAAS,CAAC,CAAC,CAuBvB;IAED;;;OAGG;IACH,QAFa,SAAS,CAAC,CAAC,CAuBvB;IAjFD,yDA2BC;;CAuDJ"}
1
+ {"version":3,"file":"HashMap.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/map/HashMap.js"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;GAYG;AACH,uFAIC;AAsHD;;;;;;;GAOG;AACH;IA2DI;;;;;;OAMG;IACH,4FALuB,MAAM,EAsC5B;IAlBG;;;;;OAKG;IACH,iCAAsC;IACtC;;;;;OAKG;IACH,qCAA8C;IAOlD,mBAEC;IAED;;;OAGG;IACH,kBAFa,MAAM,CAIlB;IA2HD;;;;OAIG;IACH,SAHW,CAAC,SACD,CAAC,QAoEX;IAED;;;;OAIG;IACH,SAHW,CAAC,GACC,CAAC,GAAC,SAAS,CA+BvB;IAED;;;;;;;;OAQG;IACH,kBALW,CAAC,kBACQ,CAAC,KAAE,CAAC,0BAEZ,CAAC,CAcZ;IAED;;;;;OAKG;IACH,cAJW,CAAC,SACD,CAAC,GACA,CAAC,CAYZ;IAuBD;;;;OAIG;IACH,YAHW,CAAC,GACC,OAAO,CA+CnB;IAED;;;;;OAKG;IACH,4CAFa,OAAO,CA+BnB;IAOD;;OAEG;IACH,gBAkDC;IAmBD,2CAwBC;IAED;;;;OAIG;IACH,SAHW,CAAC,GACC,OAAO,CAInB;IAED;;OAEG;IACH,cA6BC;IA+BD;;;OAGG;IACH,UAFa,SAAS,CAAC,CAAC,CAOvB;IAED;;;OAGG;IACH,QAFa,SAAS,CAAC,CAAC,CAMvB;IAhDD,yDA2BC;;CAsBJ"}
@@ -831,53 +831,20 @@ export class HashMap {
831
831
  *
832
832
  * @returns {Iterator<V>}
833
833
  */
834
- values() {
835
- const entryIterator = this[Symbol.iterator]();
836
-
837
- return {
838
- next() {
839
- const n = entryIterator.next();
840
-
841
- if (n.done) {
842
- return {
843
- done: true,
844
- value: undefined
845
- };
846
- } else {
847
- return {
848
- done: false,
849
- value: n.value[1]
850
- };
851
- }
834
+ * values() {
852
835
 
853
- }
854
- };
836
+ for (const [k, v] of this) {
837
+ yield v;
838
+ }
855
839
  }
856
840
 
857
841
  /**
858
842
  *
859
843
  * @returns {Iterator<K>}
860
844
  */
861
- keys() {
862
- const entryIterator = this[Symbol.iterator]();
863
-
864
- return {
865
- next() {
866
- const n = entryIterator.next();
867
-
868
- if (n.done) {
869
- return {
870
- done: true,
871
- value: undefined
872
- };
873
- } else {
874
- return {
875
- done: false,
876
- value: n.value[0]
877
- };
878
- }
879
-
880
- }
881
- };
845
+ * keys() {
846
+ for (const [k, v] of this) {
847
+ yield k;
848
+ }
882
849
  }
883
850
  }
@@ -20,4 +20,20 @@ test("add same element twice", () => {
20
20
  set.add("a");
21
21
 
22
22
  expect(set.size).toBe(1);
23
+ });
24
+
25
+ test("iterator symbol",()=>{
26
+
27
+ const set = new HashSet({
28
+ keyHashFunction: computeStringHash,
29
+ keyEqualityFunction: strictEquals
30
+ });
31
+
32
+ set.add("a");
33
+
34
+ const iterator = set[Symbol.iterator]();
35
+ expect(iterator.next()).toEqual({
36
+ done:false,
37
+ value: "a"
38
+ });
23
39
  });