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
package/dist/mobx.esm.js
CHANGED
|
@@ -203,15 +203,24 @@ function createInstanceofPredicate(name, theClass) {
|
|
|
203
203
|
return isObject(x) && x[propName] === true;
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* Yields true for both native and observable Map, even across different windows.
|
|
208
|
+
*/
|
|
206
209
|
function isES6Map(thing) {
|
|
207
210
|
return thing != null && Object.prototype.toString.call(thing) === "[object Map]";
|
|
208
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* Makes sure a Map is an instance of non-inherited native or observable Map.
|
|
214
|
+
*/
|
|
209
215
|
function isPlainES6Map(thing) {
|
|
210
216
|
var mapProto = Object.getPrototypeOf(thing);
|
|
211
217
|
var objectProto = Object.getPrototypeOf(mapProto);
|
|
212
218
|
var nullProto = Object.getPrototypeOf(objectProto);
|
|
213
219
|
return nullProto === null;
|
|
214
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* Yields true for both native and observable Set, even across different windows.
|
|
223
|
+
*/
|
|
215
224
|
function isES6Set(thing) {
|
|
216
225
|
return thing != null && Object.prototype.toString.call(thing) === "[object Set]";
|
|
217
226
|
}
|
|
@@ -4792,7 +4801,7 @@ var ObservableSet = /*#__PURE__*/function () {
|
|
|
4792
4801
|
});
|
|
4793
4802
|
};
|
|
4794
4803
|
_proto.intersection = function intersection(otherSet) {
|
|
4795
|
-
if (isES6Set(otherSet)) {
|
|
4804
|
+
if (isES6Set(otherSet) && !isObservableSet(otherSet)) {
|
|
4796
4805
|
return otherSet.intersection(this);
|
|
4797
4806
|
} else {
|
|
4798
4807
|
var dehancedSet = new Set(this);
|
|
@@ -4800,7 +4809,7 @@ var ObservableSet = /*#__PURE__*/function () {
|
|
|
4800
4809
|
}
|
|
4801
4810
|
};
|
|
4802
4811
|
_proto.union = function union(otherSet) {
|
|
4803
|
-
if (isES6Set(otherSet)) {
|
|
4812
|
+
if (isES6Set(otherSet) && !isObservableSet(otherSet)) {
|
|
4804
4813
|
return otherSet.union(this);
|
|
4805
4814
|
} else {
|
|
4806
4815
|
var dehancedSet = new Set(this);
|
|
@@ -4811,7 +4820,7 @@ var ObservableSet = /*#__PURE__*/function () {
|
|
|
4811
4820
|
return new Set(this).difference(otherSet);
|
|
4812
4821
|
};
|
|
4813
4822
|
_proto.symmetricDifference = function symmetricDifference(otherSet) {
|
|
4814
|
-
if (isES6Set(otherSet)) {
|
|
4823
|
+
if (isES6Set(otherSet) && !isObservableSet(otherSet)) {
|
|
4815
4824
|
return otherSet.symmetricDifference(this);
|
|
4816
4825
|
} else {
|
|
4817
4826
|
var dehancedSet = new Set(this);
|
|
@@ -4825,7 +4834,7 @@ var ObservableSet = /*#__PURE__*/function () {
|
|
|
4825
4834
|
return new Set(this).isSupersetOf(otherSet);
|
|
4826
4835
|
};
|
|
4827
4836
|
_proto.isDisjointFrom = function isDisjointFrom(otherSet) {
|
|
4828
|
-
if (isES6Set(otherSet)) {
|
|
4837
|
+
if (isES6Set(otherSet) && !isObservableSet(otherSet)) {
|
|
4829
4838
|
return otherSet.isDisjointFrom(this);
|
|
4830
4839
|
} else {
|
|
4831
4840
|
var dehancedSet = new Set(this);
|