@blackglory/structures 0.6.7 → 0.6.8
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/dist/es2015/index.min.mjs +1 -1
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +4 -4
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +4 -4
- 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 +4 -4
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +4 -4
- 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-set.js +4 -2
- package/lib/es2015/sparse-set.js.map +1 -1
- package/lib/es2018/sparse-set.js +4 -2
- package/lib/es2018/sparse-set.js.map +1 -1
- package/package.json +1 -1
package/dist/es2018/index.umd.js
CHANGED
|
@@ -9661,8 +9661,10 @@
|
|
|
9661
9661
|
}
|
|
9662
9662
|
}
|
|
9663
9663
|
has(value) {
|
|
9664
|
-
|
|
9665
|
-
return es2018$e.
|
|
9664
|
+
const index = this.valueToValueIndex[value];
|
|
9665
|
+
return es2018$e.isUndefined(index)
|
|
9666
|
+
? false
|
|
9667
|
+
: this.values[index] === value;
|
|
9666
9668
|
}
|
|
9667
9669
|
add(value) {
|
|
9668
9670
|
if (!this.has(value)) {
|
|
@@ -9678,8 +9680,6 @@
|
|
|
9678
9680
|
const indexOfValue = this.valueToValueIndex[value];
|
|
9679
9681
|
this.values[indexOfValue] = lastValue;
|
|
9680
9682
|
this.valueToValueIndex[lastValue] = indexOfValue;
|
|
9681
|
-
// 跟一般的实现不同, 直接删除值的索引.
|
|
9682
|
-
this.valueToValueIndex[value] = undefined;
|
|
9683
9683
|
}
|
|
9684
9684
|
}
|
|
9685
9685
|
}
|