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
|
@@ -202,15 +202,24 @@ function createInstanceofPredicate(name, theClass) {
|
|
|
202
202
|
return isObject(x) && x[propName] === true;
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
* Yields true for both native and observable Map, even across different windows.
|
|
207
|
+
*/
|
|
205
208
|
function isES6Map(thing) {
|
|
206
209
|
return thing != null && Object.prototype.toString.call(thing) === "[object Map]";
|
|
207
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* Makes sure a Map is an instance of non-inherited native or observable Map.
|
|
213
|
+
*/
|
|
208
214
|
function isPlainES6Map(thing) {
|
|
209
215
|
var mapProto = Object.getPrototypeOf(thing);
|
|
210
216
|
var objectProto = Object.getPrototypeOf(mapProto);
|
|
211
217
|
var nullProto = Object.getPrototypeOf(objectProto);
|
|
212
218
|
return nullProto === null;
|
|
213
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Yields true for both native and observable Set, even across different windows.
|
|
222
|
+
*/
|
|
214
223
|
function isES6Set(thing) {
|
|
215
224
|
return thing != null && Object.prototype.toString.call(thing) === "[object Set]";
|
|
216
225
|
}
|
|
@@ -4767,7 +4776,7 @@ var ObservableSet = /*#__PURE__*/function () {
|
|
|
4767
4776
|
});
|
|
4768
4777
|
};
|
|
4769
4778
|
_proto.intersection = function intersection(otherSet) {
|
|
4770
|
-
if (isES6Set(otherSet)) {
|
|
4779
|
+
if (isES6Set(otherSet) && !isObservableSet(otherSet)) {
|
|
4771
4780
|
return otherSet.intersection(this);
|
|
4772
4781
|
} else {
|
|
4773
4782
|
var dehancedSet = new Set(this);
|
|
@@ -4775,7 +4784,7 @@ var ObservableSet = /*#__PURE__*/function () {
|
|
|
4775
4784
|
}
|
|
4776
4785
|
};
|
|
4777
4786
|
_proto.union = function union(otherSet) {
|
|
4778
|
-
if (isES6Set(otherSet)) {
|
|
4787
|
+
if (isES6Set(otherSet) && !isObservableSet(otherSet)) {
|
|
4779
4788
|
return otherSet.union(this);
|
|
4780
4789
|
} else {
|
|
4781
4790
|
var dehancedSet = new Set(this);
|
|
@@ -4786,7 +4795,7 @@ var ObservableSet = /*#__PURE__*/function () {
|
|
|
4786
4795
|
return new Set(this).difference(otherSet);
|
|
4787
4796
|
};
|
|
4788
4797
|
_proto.symmetricDifference = function symmetricDifference(otherSet) {
|
|
4789
|
-
if (isES6Set(otherSet)) {
|
|
4798
|
+
if (isES6Set(otherSet) && !isObservableSet(otherSet)) {
|
|
4790
4799
|
return otherSet.symmetricDifference(this);
|
|
4791
4800
|
} else {
|
|
4792
4801
|
var dehancedSet = new Set(this);
|
|
@@ -4800,7 +4809,7 @@ var ObservableSet = /*#__PURE__*/function () {
|
|
|
4800
4809
|
return new Set(this).isSupersetOf(otherSet);
|
|
4801
4810
|
};
|
|
4802
4811
|
_proto.isDisjointFrom = function isDisjointFrom(otherSet) {
|
|
4803
|
-
if (isES6Set(otherSet)) {
|
|
4812
|
+
if (isES6Set(otherSet) && !isObservableSet(otherSet)) {
|
|
4804
4813
|
return otherSet.isDisjointFrom(this);
|
|
4805
4814
|
} else {
|
|
4806
4815
|
var dehancedSet = new Set(this);
|