@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.
- package/README.md +20 -1
- package/dist/es2015/index.min.mjs +2 -2
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +18 -0
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +18 -0
- 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 +18 -0
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +18 -0
- 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/dynamic-typed-array.d.ts +1 -0
- package/lib/es2015/dynamic-typed-array.js +6 -0
- package/lib/es2015/dynamic-typed-array.js.map +1 -1
- package/lib/es2015/sparse-map.d.ts +2 -0
- package/lib/es2015/sparse-map.js +6 -0
- package/lib/es2015/sparse-map.js.map +1 -1
- package/lib/es2015/typed-sparse-map.d.ts +3 -1
- package/lib/es2015/typed-sparse-map.js +6 -0
- package/lib/es2015/typed-sparse-map.js.map +1 -1
- package/lib/es2018/dynamic-typed-array.d.ts +1 -0
- package/lib/es2018/dynamic-typed-array.js +6 -0
- package/lib/es2018/dynamic-typed-array.js.map +1 -1
- package/lib/es2018/sparse-map.d.ts +2 -0
- package/lib/es2018/sparse-map.js +6 -0
- package/lib/es2018/sparse-map.js.map +1 -1
- package/lib/es2018/typed-sparse-map.d.ts +3 -1
- package/lib/es2018/typed-sparse-map.js +6 -0
- package/lib/es2018/typed-sparse-map.js.map +1 -1
- package/package.json +1 -1
package/dist/es2015/index.mjs
CHANGED
|
@@ -16481,6 +16481,12 @@ class SparseMap {
|
|
|
16481
16481
|
get [Symbol.toStringTag]() {
|
|
16482
16482
|
return this.constructor.name;
|
|
16483
16483
|
}
|
|
16484
|
+
get size() {
|
|
16485
|
+
return this.indexToKey.length;
|
|
16486
|
+
}
|
|
16487
|
+
get internalArray() {
|
|
16488
|
+
return this.indexToValue;
|
|
16489
|
+
}
|
|
16484
16490
|
*entries() {
|
|
16485
16491
|
for (let i = 0; i < this.indexToKey.length; i++) {
|
|
16486
16492
|
yield [this.indexToKey[i], this.indexToValue[i]];
|
|
@@ -16545,6 +16551,12 @@ class TypedSparseMap {
|
|
|
16545
16551
|
get [Symbol.toStringTag]() {
|
|
16546
16552
|
return this.constructor.name;
|
|
16547
16553
|
}
|
|
16554
|
+
get size() {
|
|
16555
|
+
return this.indexToKey.length;
|
|
16556
|
+
}
|
|
16557
|
+
get internalTypedArray() {
|
|
16558
|
+
return this.indexToValue.internalTypedArray;
|
|
16559
|
+
}
|
|
16548
16560
|
*entries() {
|
|
16549
16561
|
for (let i = 0; i < this.indexToKey.length; i++) {
|
|
16550
16562
|
yield [
|
|
@@ -16715,6 +16727,12 @@ class DynamicTypedArray {
|
|
|
16715
16727
|
return undefined;
|
|
16716
16728
|
}
|
|
16717
16729
|
}
|
|
16730
|
+
sort(compare) {
|
|
16731
|
+
const capacity = this.capacity;
|
|
16732
|
+
this.resize(this.length);
|
|
16733
|
+
this.array.sort(compare);
|
|
16734
|
+
this.resize(capacity);
|
|
16735
|
+
}
|
|
16718
16736
|
resize(newCapacity) {
|
|
16719
16737
|
if (this.array.length === newCapacity) {
|
|
16720
16738
|
return;
|