@blackglory/structures 0.10.8 → 0.10.11

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.
Files changed (36) hide show
  1. package/README.md +20 -1
  2. package/dist/es2015/index.min.mjs +2 -2
  3. package/dist/es2015/index.min.mjs.map +1 -1
  4. package/dist/es2015/index.mjs +18 -0
  5. package/dist/es2015/index.mjs.map +1 -1
  6. package/dist/es2015/index.umd.js +18 -0
  7. package/dist/es2015/index.umd.js.map +1 -1
  8. package/dist/es2015/index.umd.min.js +2 -2
  9. package/dist/es2015/index.umd.min.js.map +1 -1
  10. package/dist/es2018/index.min.mjs +2 -2
  11. package/dist/es2018/index.min.mjs.map +1 -1
  12. package/dist/es2018/index.mjs +18 -0
  13. package/dist/es2018/index.mjs.map +1 -1
  14. package/dist/es2018/index.umd.js +18 -0
  15. package/dist/es2018/index.umd.js.map +1 -1
  16. package/dist/es2018/index.umd.min.js +2 -2
  17. package/dist/es2018/index.umd.min.js.map +1 -1
  18. package/lib/es2015/dynamic-typed-array.d.ts +1 -0
  19. package/lib/es2015/dynamic-typed-array.js +6 -0
  20. package/lib/es2015/dynamic-typed-array.js.map +1 -1
  21. package/lib/es2015/sparse-map.d.ts +2 -0
  22. package/lib/es2015/sparse-map.js +6 -0
  23. package/lib/es2015/sparse-map.js.map +1 -1
  24. package/lib/es2015/typed-sparse-map.d.ts +3 -1
  25. package/lib/es2015/typed-sparse-map.js +6 -0
  26. package/lib/es2015/typed-sparse-map.js.map +1 -1
  27. package/lib/es2018/dynamic-typed-array.d.ts +1 -0
  28. package/lib/es2018/dynamic-typed-array.js +6 -0
  29. package/lib/es2018/dynamic-typed-array.js.map +1 -1
  30. package/lib/es2018/sparse-map.d.ts +2 -0
  31. package/lib/es2018/sparse-map.js +6 -0
  32. package/lib/es2018/sparse-map.js.map +1 -1
  33. package/lib/es2018/typed-sparse-map.d.ts +3 -1
  34. package/lib/es2018/typed-sparse-map.js +6 -0
  35. package/lib/es2018/typed-sparse-map.js.map +1 -1
  36. package/package.json +1 -1
@@ -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]];
@@ -16551,6 +16557,12 @@
16551
16557
  get [Symbol.toStringTag]() {
16552
16558
  return this.constructor.name;
16553
16559
  }
16560
+ get size() {
16561
+ return this.indexToKey.length;
16562
+ }
16563
+ get internalTypedArray() {
16564
+ return this.indexToValue.internalTypedArray;
16565
+ }
16554
16566
  *entries() {
16555
16567
  for (let i = 0; i < this.indexToKey.length; i++) {
16556
16568
  yield [
@@ -16721,6 +16733,12 @@
16721
16733
  return undefined;
16722
16734
  }
16723
16735
  }
16736
+ sort(compare) {
16737
+ const capacity = this.capacity;
16738
+ this.resize(this.length);
16739
+ this.array.sort(compare);
16740
+ this.resize(capacity);
16741
+ }
16724
16742
  resize(newCapacity) {
16725
16743
  if (this.array.length === newCapacity) {
16726
16744
  return;