mobx 6.13.1 → 6.13.2
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/CHANGELOG.md +6 -0
- package/README.md +2 -2
- package/dist/mobx.cjs.development.js +13 -4
- package/dist/mobx.cjs.development.js.map +1 -1
- package/dist/mobx.cjs.production.min.js +1 -1
- package/dist/mobx.cjs.production.min.js.map +1 -1
- package/dist/mobx.esm.development.js +13 -4
- package/dist/mobx.esm.development.js.map +1 -1
- package/dist/mobx.esm.js +13 -4
- package/dist/mobx.esm.js.map +1 -1
- package/dist/mobx.esm.production.min.js +1 -1
- package/dist/mobx.esm.production.min.js.map +1 -1
- package/dist/mobx.umd.development.js +13 -4
- package/dist/mobx.umd.development.js.map +1 -1
- package/dist/mobx.umd.production.min.js +1 -1
- package/dist/mobx.umd.production.min.js.map +1 -1
- package/dist/utils/utils.d.ts +12 -3
- package/package.json +1 -1
- package/src/types/observableset.ts +4 -4
- package/src/utils/utils.ts +12 -3
|
@@ -208,15 +208,24 @@
|
|
|
208
208
|
return isObject(x) && x[propName] === true;
|
|
209
209
|
};
|
|
210
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* Yields true for both native and observable Map, even across different windows.
|
|
213
|
+
*/
|
|
211
214
|
function isES6Map(thing) {
|
|
212
215
|
return thing != null && Object.prototype.toString.call(thing) === "[object Map]";
|
|
213
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* Makes sure a Map is an instance of non-inherited native or observable Map.
|
|
219
|
+
*/
|
|
214
220
|
function isPlainES6Map(thing) {
|
|
215
221
|
var mapProto = Object.getPrototypeOf(thing);
|
|
216
222
|
var objectProto = Object.getPrototypeOf(mapProto);
|
|
217
223
|
var nullProto = Object.getPrototypeOf(objectProto);
|
|
218
224
|
return nullProto === null;
|
|
219
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* Yields true for both native and observable Set, even across different windows.
|
|
228
|
+
*/
|
|
220
229
|
function isES6Set(thing) {
|
|
221
230
|
return thing != null && Object.prototype.toString.call(thing) === "[object Set]";
|
|
222
231
|
}
|
|
@@ -4773,7 +4782,7 @@
|
|
|
4773
4782
|
});
|
|
4774
4783
|
};
|
|
4775
4784
|
_proto.intersection = function intersection(otherSet) {
|
|
4776
|
-
if (isES6Set(otherSet)) {
|
|
4785
|
+
if (isES6Set(otherSet) && !isObservableSet(otherSet)) {
|
|
4777
4786
|
return otherSet.intersection(this);
|
|
4778
4787
|
} else {
|
|
4779
4788
|
var dehancedSet = new Set(this);
|
|
@@ -4781,7 +4790,7 @@
|
|
|
4781
4790
|
}
|
|
4782
4791
|
};
|
|
4783
4792
|
_proto.union = function union(otherSet) {
|
|
4784
|
-
if (isES6Set(otherSet)) {
|
|
4793
|
+
if (isES6Set(otherSet) && !isObservableSet(otherSet)) {
|
|
4785
4794
|
return otherSet.union(this);
|
|
4786
4795
|
} else {
|
|
4787
4796
|
var dehancedSet = new Set(this);
|
|
@@ -4792,7 +4801,7 @@
|
|
|
4792
4801
|
return new Set(this).difference(otherSet);
|
|
4793
4802
|
};
|
|
4794
4803
|
_proto.symmetricDifference = function symmetricDifference(otherSet) {
|
|
4795
|
-
if (isES6Set(otherSet)) {
|
|
4804
|
+
if (isES6Set(otherSet) && !isObservableSet(otherSet)) {
|
|
4796
4805
|
return otherSet.symmetricDifference(this);
|
|
4797
4806
|
} else {
|
|
4798
4807
|
var dehancedSet = new Set(this);
|
|
@@ -4806,7 +4815,7 @@
|
|
|
4806
4815
|
return new Set(this).isSupersetOf(otherSet);
|
|
4807
4816
|
};
|
|
4808
4817
|
_proto.isDisjointFrom = function isDisjointFrom(otherSet) {
|
|
4809
|
-
if (isES6Set(otherSet)) {
|
|
4818
|
+
if (isES6Set(otherSet) && !isObservableSet(otherSet)) {
|
|
4810
4819
|
return otherSet.isDisjointFrom(this);
|
|
4811
4820
|
} else {
|
|
4812
4821
|
var dehancedSet = new Set(this);
|