@blackglory/structures 0.10.11 → 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.
- package/README.md +4 -0
- package/dist/es2015/index.min.mjs +1 -1
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +6 -0
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +6 -0
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +1 -1
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +1 -1
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +6 -0
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +6 -0
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +1 -1
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/lib/es2015/sparse-map.d.ts +1 -0
- package/lib/es2015/sparse-map.js +3 -0
- package/lib/es2015/sparse-map.js.map +1 -1
- package/lib/es2015/typed-sparse-map.d.ts +1 -0
- package/lib/es2015/typed-sparse-map.js +3 -0
- package/lib/es2015/typed-sparse-map.js.map +1 -1
- package/lib/es2018/sparse-map.d.ts +1 -0
- package/lib/es2018/sparse-map.js +3 -0
- package/lib/es2018/sparse-map.js.map +1 -1
- package/lib/es2018/typed-sparse-map.d.ts +1 -0
- package/lib/es2018/typed-sparse-map.js +3 -0
- package/lib/es2018/typed-sparse-map.js.map +1 -1
- package/package.json +1 -1
package/dist/es2015/index.mjs
CHANGED
|
@@ -16498,6 +16498,9 @@ class SparseMap {
|
|
|
16498
16498
|
values() {
|
|
16499
16499
|
return this.indexToValue.values();
|
|
16500
16500
|
}
|
|
16501
|
+
getInternalIndexOfKey(key) {
|
|
16502
|
+
return this.keyToIndex[key];
|
|
16503
|
+
}
|
|
16501
16504
|
has(key) {
|
|
16502
16505
|
// 跟一般的稀疏集实现不同, 不需要访问values数组.
|
|
16503
16506
|
return key in this.keyToIndex;
|
|
@@ -16573,6 +16576,9 @@ class TypedSparseMap {
|
|
|
16573
16576
|
yield this.indexToValue.internalTypedArray[i];
|
|
16574
16577
|
}
|
|
16575
16578
|
}
|
|
16579
|
+
getInternalIndexOfKey(key) {
|
|
16580
|
+
return this.keyToIndex[key];
|
|
16581
|
+
}
|
|
16576
16582
|
has(key) {
|
|
16577
16583
|
const index = this.keyToIndex[key];
|
|
16578
16584
|
return this.indexToKey[index] === key;
|