@blackglory/structures 0.10.9 → 0.10.12

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.
@@ -16487,6 +16487,12 @@
16487
16487
  get [Symbol.toStringTag]() {
16488
16488
  return this.constructor.name;
16489
16489
  }
16490
+ get size() {
16491
+ return this.indexToKey.length;
16492
+ }
16493
+ get internalArray() {
16494
+ return this.indexToValue;
16495
+ }
16490
16496
  *entries() {
16491
16497
  for (let i = 0; i < this.indexToKey.length; i++) {
16492
16498
  yield [this.indexToKey[i], this.indexToValue[i]];
@@ -16498,6 +16504,9 @@
16498
16504
  values() {
16499
16505
  return this.indexToValue.values();
16500
16506
  }
16507
+ getInternalIndexOfKey(key) {
16508
+ return this.keyToIndex[key];
16509
+ }
16501
16510
  has(key) {
16502
16511
  // 跟一般的稀疏集实现不同, 不需要访问values数组.
16503
16512
  return key in this.keyToIndex;
@@ -16551,6 +16560,12 @@
16551
16560
  get [Symbol.toStringTag]() {
16552
16561
  return this.constructor.name;
16553
16562
  }
16563
+ get size() {
16564
+ return this.indexToKey.length;
16565
+ }
16566
+ get internalTypedArray() {
16567
+ return this.indexToValue.internalTypedArray;
16568
+ }
16554
16569
  *entries() {
16555
16570
  for (let i = 0; i < this.indexToKey.length; i++) {
16556
16571
  yield [
@@ -16567,6 +16582,9 @@
16567
16582
  yield this.indexToValue.internalTypedArray[i];
16568
16583
  }
16569
16584
  }
16585
+ getInternalIndexOfKey(key) {
16586
+ return this.keyToIndex[key];
16587
+ }
16570
16588
  has(key) {
16571
16589
  const index = this.keyToIndex[key];
16572
16590
  return this.indexToKey[index] === key;