@blackglory/structures 0.7.0 → 0.8.0
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.
- package/README.md +20 -4
- package/dist/es2015/index.min.mjs +2 -2
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +7 -7
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +7 -7
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +2 -2
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +2 -2
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +7 -7
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +7 -7
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +2 -2
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/lib/es2015/sparse-map.d.ts +8 -1
- package/lib/es2015/sparse-map.js +4 -4
- package/lib/es2015/sparse-map.js.map +1 -1
- package/lib/es2015/sparse-set.d.ts +8 -2
- package/lib/es2015/sparse-set.js +3 -3
- package/lib/es2015/sparse-set.js.map +1 -1
- package/lib/es2018/sparse-map.d.ts +8 -1
- package/lib/es2018/sparse-map.js +4 -4
- package/lib/es2018/sparse-map.js.map +1 -1
- package/lib/es2018/sparse-set.d.ts +8 -2
- package/lib/es2018/sparse-set.js +3 -3
- package/lib/es2018/sparse-set.js.map +1 -1
- package/package.json +2 -2
package/dist/es2018/index.mjs
CHANGED
|
@@ -9762,9 +9762,9 @@ function computeNewCapacity(oldCapacity, targetLength, growthFactor) {
|
|
|
9762
9762
|
}
|
|
9763
9763
|
|
|
9764
9764
|
class SparseSet {
|
|
9765
|
-
constructor() {
|
|
9766
|
-
this.indexToValue = new DynamicTypedArray(
|
|
9767
|
-
this.valueToIndex = new DynamicTypedArray(Uint32Array);
|
|
9765
|
+
constructor(typedArrayConstructor, { capacity = 0, growthFactor = 1.5 } = {}) {
|
|
9766
|
+
this.indexToValue = new DynamicTypedArray(typedArrayConstructor, { capacity, growthFactor });
|
|
9767
|
+
this.valueToIndex = new DynamicTypedArray(Uint32Array, { capacity, growthFactor });
|
|
9768
9768
|
}
|
|
9769
9769
|
get [Symbol.toStringTag]() {
|
|
9770
9770
|
return this.constructor.name;
|
|
@@ -9796,10 +9796,10 @@ class SparseSet {
|
|
|
9796
9796
|
}
|
|
9797
9797
|
|
|
9798
9798
|
class SparseMap {
|
|
9799
|
-
constructor() {
|
|
9800
|
-
this.
|
|
9801
|
-
this.
|
|
9802
|
-
this.
|
|
9799
|
+
constructor(typedArrayConstructor, { capacity = 0, growthFactor = 1.5 } = {}) {
|
|
9800
|
+
this.indexToValue = new DynamicTypedArray(typedArrayConstructor, { capacity, growthFactor });
|
|
9801
|
+
this.keyToIndex = new DynamicTypedArray(Uint32Array, { capacity, growthFactor });
|
|
9802
|
+
this.indexToKey = new DynamicTypedArray(Uint32Array, { capacity, growthFactor });
|
|
9803
9803
|
}
|
|
9804
9804
|
get [Symbol.toStringTag]() {
|
|
9805
9805
|
return this.constructor.name;
|