@symbo.ls/scratch 2.11.446 → 2.11.450
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/cjs/factory.js +32 -4
- package/dist/cjs/index.js +32 -4
- package/dist/cjs/set.js +32 -4
- package/dist/cjs/system/color.js +32 -4
- package/dist/cjs/system/document.js +32 -4
- package/dist/cjs/system/font.js +32 -4
- package/dist/cjs/system/index.js +32 -4
- package/dist/cjs/system/reset.js +32 -4
- package/dist/cjs/system/shadow.js +32 -4
- package/dist/cjs/system/spacing.js +32 -4
- package/dist/cjs/system/svg.js +32 -4
- package/dist/cjs/system/theme.js +32 -4
- package/dist/cjs/system/timing.js +32 -4
- package/dist/cjs/system/typography.js +32 -4
- package/dist/cjs/transforms/index.js +32 -4
- package/dist/cjs/utils/color.js +32 -4
- package/dist/cjs/utils/index.js +32 -4
- package/dist/cjs/utils/sequence.js +32 -4
- package/dist/cjs/utils/sprite.js +32 -4
- package/dist/cjs/utils/var.js +32 -4
- package/package.json +3 -3
package/dist/cjs/factory.js
CHANGED
|
@@ -606,6 +606,7 @@ var require_object = __commonJS({
|
|
|
606
606
|
exec: () => exec,
|
|
607
607
|
flattenRecursive: () => flattenRecursive,
|
|
608
608
|
hasOwnProperty: () => hasOwnProperty,
|
|
609
|
+
isCyclic: () => isCyclic,
|
|
609
610
|
isEmpty: () => isEmpty,
|
|
610
611
|
isEmptyObject: () => isEmptyObject,
|
|
611
612
|
isEqualDeep: () => isEqualDeep,
|
|
@@ -731,20 +732,28 @@ var require_object = __commonJS({
|
|
|
731
732
|
}
|
|
732
733
|
return clone2;
|
|
733
734
|
};
|
|
734
|
-
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}, visited = /* @__PURE__ */ new WeakSet()) => {
|
|
736
|
+
if ((0, import_types.isObjectLike)(obj)) {
|
|
737
|
+
if (visited.has(obj)) {
|
|
738
|
+
return obj;
|
|
739
|
+
}
|
|
740
|
+
visited.add(obj);
|
|
741
|
+
}
|
|
735
742
|
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
736
743
|
for (const prop in obj) {
|
|
737
744
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
745
|
continue;
|
|
739
746
|
const objProp = obj[prop];
|
|
740
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
747
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp)) {
|
|
741
748
|
continue;
|
|
749
|
+
}
|
|
742
750
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
743
|
-
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
751
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options, visited);
|
|
744
752
|
} else if ((0, import_types.isFunction)(objProp) && options.window) {
|
|
745
753
|
o[prop] = (options.window || import_globals.window).eval("(" + objProp.toString() + ")");
|
|
746
|
-
} else
|
|
754
|
+
} else {
|
|
747
755
|
o[prop] = objProp;
|
|
756
|
+
}
|
|
748
757
|
}
|
|
749
758
|
return o;
|
|
750
759
|
};
|
|
@@ -1203,6 +1212,25 @@ var require_object = __commonJS({
|
|
|
1203
1212
|
}
|
|
1204
1213
|
}
|
|
1205
1214
|
};
|
|
1215
|
+
var isCyclic = (obj) => {
|
|
1216
|
+
const seenObjects = [];
|
|
1217
|
+
function detect(obj2) {
|
|
1218
|
+
if (obj2 && typeof obj2 === "object") {
|
|
1219
|
+
if (seenObjects.indexOf(obj2) !== -1) {
|
|
1220
|
+
return true;
|
|
1221
|
+
}
|
|
1222
|
+
seenObjects.push(obj2);
|
|
1223
|
+
for (const key in obj2) {
|
|
1224
|
+
if (Object.hasOwnProperty.call(obj2, key) && detect(obj2[key])) {
|
|
1225
|
+
console.log(obj2, "cycle at " + key);
|
|
1226
|
+
return true;
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
return false;
|
|
1231
|
+
}
|
|
1232
|
+
return detect(obj);
|
|
1233
|
+
};
|
|
1206
1234
|
}
|
|
1207
1235
|
});
|
|
1208
1236
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -642,6 +642,7 @@ var require_object = __commonJS({
|
|
|
642
642
|
exec: () => exec,
|
|
643
643
|
flattenRecursive: () => flattenRecursive,
|
|
644
644
|
hasOwnProperty: () => hasOwnProperty,
|
|
645
|
+
isCyclic: () => isCyclic,
|
|
645
646
|
isEmpty: () => isEmpty,
|
|
646
647
|
isEmptyObject: () => isEmptyObject,
|
|
647
648
|
isEqualDeep: () => isEqualDeep,
|
|
@@ -767,20 +768,28 @@ var require_object = __commonJS({
|
|
|
767
768
|
}
|
|
768
769
|
return clone2;
|
|
769
770
|
};
|
|
770
|
-
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
771
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}, visited = /* @__PURE__ */ new WeakSet()) => {
|
|
772
|
+
if ((0, import_types.isObjectLike)(obj)) {
|
|
773
|
+
if (visited.has(obj)) {
|
|
774
|
+
return obj;
|
|
775
|
+
}
|
|
776
|
+
visited.add(obj);
|
|
777
|
+
}
|
|
771
778
|
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
772
779
|
for (const prop in obj) {
|
|
773
780
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
774
781
|
continue;
|
|
775
782
|
const objProp = obj[prop];
|
|
776
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
783
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp)) {
|
|
777
784
|
continue;
|
|
785
|
+
}
|
|
778
786
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
779
|
-
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
787
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options, visited);
|
|
780
788
|
} else if ((0, import_types.isFunction)(objProp) && options.window) {
|
|
781
789
|
o[prop] = (options.window || import_globals3.window).eval("(" + objProp.toString() + ")");
|
|
782
|
-
} else
|
|
790
|
+
} else {
|
|
783
791
|
o[prop] = objProp;
|
|
792
|
+
}
|
|
784
793
|
}
|
|
785
794
|
return o;
|
|
786
795
|
};
|
|
@@ -1239,6 +1248,25 @@ var require_object = __commonJS({
|
|
|
1239
1248
|
}
|
|
1240
1249
|
}
|
|
1241
1250
|
};
|
|
1251
|
+
var isCyclic = (obj) => {
|
|
1252
|
+
const seenObjects = [];
|
|
1253
|
+
function detect(obj2) {
|
|
1254
|
+
if (obj2 && typeof obj2 === "object") {
|
|
1255
|
+
if (seenObjects.indexOf(obj2) !== -1) {
|
|
1256
|
+
return true;
|
|
1257
|
+
}
|
|
1258
|
+
seenObjects.push(obj2);
|
|
1259
|
+
for (const key in obj2) {
|
|
1260
|
+
if (Object.hasOwnProperty.call(obj2, key) && detect(obj2[key])) {
|
|
1261
|
+
console.log(obj2, "cycle at " + key);
|
|
1262
|
+
return true;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
return false;
|
|
1267
|
+
}
|
|
1268
|
+
return detect(obj);
|
|
1269
|
+
};
|
|
1242
1270
|
}
|
|
1243
1271
|
});
|
|
1244
1272
|
|
package/dist/cjs/set.js
CHANGED
|
@@ -606,6 +606,7 @@ var require_object = __commonJS({
|
|
|
606
606
|
exec: () => exec,
|
|
607
607
|
flattenRecursive: () => flattenRecursive,
|
|
608
608
|
hasOwnProperty: () => hasOwnProperty,
|
|
609
|
+
isCyclic: () => isCyclic,
|
|
609
610
|
isEmpty: () => isEmpty,
|
|
610
611
|
isEmptyObject: () => isEmptyObject,
|
|
611
612
|
isEqualDeep: () => isEqualDeep,
|
|
@@ -731,20 +732,28 @@ var require_object = __commonJS({
|
|
|
731
732
|
}
|
|
732
733
|
return clone2;
|
|
733
734
|
};
|
|
734
|
-
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}, visited = /* @__PURE__ */ new WeakSet()) => {
|
|
736
|
+
if ((0, import_types.isObjectLike)(obj)) {
|
|
737
|
+
if (visited.has(obj)) {
|
|
738
|
+
return obj;
|
|
739
|
+
}
|
|
740
|
+
visited.add(obj);
|
|
741
|
+
}
|
|
735
742
|
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
736
743
|
for (const prop in obj) {
|
|
737
744
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
745
|
continue;
|
|
739
746
|
const objProp = obj[prop];
|
|
740
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
747
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp)) {
|
|
741
748
|
continue;
|
|
749
|
+
}
|
|
742
750
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
743
|
-
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
751
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options, visited);
|
|
744
752
|
} else if ((0, import_types.isFunction)(objProp) && options.window) {
|
|
745
753
|
o[prop] = (options.window || import_globals3.window).eval("(" + objProp.toString() + ")");
|
|
746
|
-
} else
|
|
754
|
+
} else {
|
|
747
755
|
o[prop] = objProp;
|
|
756
|
+
}
|
|
748
757
|
}
|
|
749
758
|
return o;
|
|
750
759
|
};
|
|
@@ -1203,6 +1212,25 @@ var require_object = __commonJS({
|
|
|
1203
1212
|
}
|
|
1204
1213
|
}
|
|
1205
1214
|
};
|
|
1215
|
+
var isCyclic = (obj) => {
|
|
1216
|
+
const seenObjects = [];
|
|
1217
|
+
function detect(obj2) {
|
|
1218
|
+
if (obj2 && typeof obj2 === "object") {
|
|
1219
|
+
if (seenObjects.indexOf(obj2) !== -1) {
|
|
1220
|
+
return true;
|
|
1221
|
+
}
|
|
1222
|
+
seenObjects.push(obj2);
|
|
1223
|
+
for (const key in obj2) {
|
|
1224
|
+
if (Object.hasOwnProperty.call(obj2, key) && detect(obj2[key])) {
|
|
1225
|
+
console.log(obj2, "cycle at " + key);
|
|
1226
|
+
return true;
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
return false;
|
|
1231
|
+
}
|
|
1232
|
+
return detect(obj);
|
|
1233
|
+
};
|
|
1206
1234
|
}
|
|
1207
1235
|
});
|
|
1208
1236
|
|
package/dist/cjs/system/color.js
CHANGED
|
@@ -606,6 +606,7 @@ var require_object = __commonJS({
|
|
|
606
606
|
exec: () => exec,
|
|
607
607
|
flattenRecursive: () => flattenRecursive,
|
|
608
608
|
hasOwnProperty: () => hasOwnProperty,
|
|
609
|
+
isCyclic: () => isCyclic,
|
|
609
610
|
isEmpty: () => isEmpty,
|
|
610
611
|
isEmptyObject: () => isEmptyObject,
|
|
611
612
|
isEqualDeep: () => isEqualDeep,
|
|
@@ -731,20 +732,28 @@ var require_object = __commonJS({
|
|
|
731
732
|
}
|
|
732
733
|
return clone2;
|
|
733
734
|
};
|
|
734
|
-
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}, visited = /* @__PURE__ */ new WeakSet()) => {
|
|
736
|
+
if ((0, import_types.isObjectLike)(obj)) {
|
|
737
|
+
if (visited.has(obj)) {
|
|
738
|
+
return obj;
|
|
739
|
+
}
|
|
740
|
+
visited.add(obj);
|
|
741
|
+
}
|
|
735
742
|
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
736
743
|
for (const prop in obj) {
|
|
737
744
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
745
|
continue;
|
|
739
746
|
const objProp = obj[prop];
|
|
740
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
747
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp)) {
|
|
741
748
|
continue;
|
|
749
|
+
}
|
|
742
750
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
743
|
-
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
751
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options, visited);
|
|
744
752
|
} else if ((0, import_types.isFunction)(objProp) && options.window) {
|
|
745
753
|
o[prop] = (options.window || import_globals2.window).eval("(" + objProp.toString() + ")");
|
|
746
|
-
} else
|
|
754
|
+
} else {
|
|
747
755
|
o[prop] = objProp;
|
|
756
|
+
}
|
|
748
757
|
}
|
|
749
758
|
return o;
|
|
750
759
|
};
|
|
@@ -1203,6 +1212,25 @@ var require_object = __commonJS({
|
|
|
1203
1212
|
}
|
|
1204
1213
|
}
|
|
1205
1214
|
};
|
|
1215
|
+
var isCyclic = (obj) => {
|
|
1216
|
+
const seenObjects = [];
|
|
1217
|
+
function detect(obj2) {
|
|
1218
|
+
if (obj2 && typeof obj2 === "object") {
|
|
1219
|
+
if (seenObjects.indexOf(obj2) !== -1) {
|
|
1220
|
+
return true;
|
|
1221
|
+
}
|
|
1222
|
+
seenObjects.push(obj2);
|
|
1223
|
+
for (const key in obj2) {
|
|
1224
|
+
if (Object.hasOwnProperty.call(obj2, key) && detect(obj2[key])) {
|
|
1225
|
+
console.log(obj2, "cycle at " + key);
|
|
1226
|
+
return true;
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
return false;
|
|
1231
|
+
}
|
|
1232
|
+
return detect(obj);
|
|
1233
|
+
};
|
|
1206
1234
|
}
|
|
1207
1235
|
});
|
|
1208
1236
|
|
|
@@ -606,6 +606,7 @@ var require_object = __commonJS({
|
|
|
606
606
|
exec: () => exec,
|
|
607
607
|
flattenRecursive: () => flattenRecursive,
|
|
608
608
|
hasOwnProperty: () => hasOwnProperty,
|
|
609
|
+
isCyclic: () => isCyclic,
|
|
609
610
|
isEmpty: () => isEmpty,
|
|
610
611
|
isEmptyObject: () => isEmptyObject,
|
|
611
612
|
isEqualDeep: () => isEqualDeep,
|
|
@@ -731,20 +732,28 @@ var require_object = __commonJS({
|
|
|
731
732
|
}
|
|
732
733
|
return clone2;
|
|
733
734
|
};
|
|
734
|
-
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}, visited = /* @__PURE__ */ new WeakSet()) => {
|
|
736
|
+
if ((0, import_types.isObjectLike)(obj)) {
|
|
737
|
+
if (visited.has(obj)) {
|
|
738
|
+
return obj;
|
|
739
|
+
}
|
|
740
|
+
visited.add(obj);
|
|
741
|
+
}
|
|
735
742
|
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
736
743
|
for (const prop in obj) {
|
|
737
744
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
745
|
continue;
|
|
739
746
|
const objProp = obj[prop];
|
|
740
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
747
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp)) {
|
|
741
748
|
continue;
|
|
749
|
+
}
|
|
742
750
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
743
|
-
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
751
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options, visited);
|
|
744
752
|
} else if ((0, import_types.isFunction)(objProp) && options.window) {
|
|
745
753
|
o[prop] = (options.window || import_globals2.window).eval("(" + objProp.toString() + ")");
|
|
746
|
-
} else
|
|
754
|
+
} else {
|
|
747
755
|
o[prop] = objProp;
|
|
756
|
+
}
|
|
748
757
|
}
|
|
749
758
|
return o;
|
|
750
759
|
};
|
|
@@ -1203,6 +1212,25 @@ var require_object = __commonJS({
|
|
|
1203
1212
|
}
|
|
1204
1213
|
}
|
|
1205
1214
|
};
|
|
1215
|
+
var isCyclic = (obj) => {
|
|
1216
|
+
const seenObjects = [];
|
|
1217
|
+
function detect(obj2) {
|
|
1218
|
+
if (obj2 && typeof obj2 === "object") {
|
|
1219
|
+
if (seenObjects.indexOf(obj2) !== -1) {
|
|
1220
|
+
return true;
|
|
1221
|
+
}
|
|
1222
|
+
seenObjects.push(obj2);
|
|
1223
|
+
for (const key in obj2) {
|
|
1224
|
+
if (Object.hasOwnProperty.call(obj2, key) && detect(obj2[key])) {
|
|
1225
|
+
console.log(obj2, "cycle at " + key);
|
|
1226
|
+
return true;
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
return false;
|
|
1231
|
+
}
|
|
1232
|
+
return detect(obj);
|
|
1233
|
+
};
|
|
1206
1234
|
}
|
|
1207
1235
|
});
|
|
1208
1236
|
|
package/dist/cjs/system/font.js
CHANGED
|
@@ -606,6 +606,7 @@ var require_object = __commonJS({
|
|
|
606
606
|
exec: () => exec,
|
|
607
607
|
flattenRecursive: () => flattenRecursive,
|
|
608
608
|
hasOwnProperty: () => hasOwnProperty,
|
|
609
|
+
isCyclic: () => isCyclic,
|
|
609
610
|
isEmpty: () => isEmpty,
|
|
610
611
|
isEmptyObject: () => isEmptyObject,
|
|
611
612
|
isEqualDeep: () => isEqualDeep,
|
|
@@ -731,20 +732,28 @@ var require_object = __commonJS({
|
|
|
731
732
|
}
|
|
732
733
|
return clone2;
|
|
733
734
|
};
|
|
734
|
-
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}, visited = /* @__PURE__ */ new WeakSet()) => {
|
|
736
|
+
if ((0, import_types.isObjectLike)(obj)) {
|
|
737
|
+
if (visited.has(obj)) {
|
|
738
|
+
return obj;
|
|
739
|
+
}
|
|
740
|
+
visited.add(obj);
|
|
741
|
+
}
|
|
735
742
|
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
736
743
|
for (const prop in obj) {
|
|
737
744
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
745
|
continue;
|
|
739
746
|
const objProp = obj[prop];
|
|
740
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
747
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp)) {
|
|
741
748
|
continue;
|
|
749
|
+
}
|
|
742
750
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
743
|
-
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
751
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options, visited);
|
|
744
752
|
} else if ((0, import_types.isFunction)(objProp) && options.window) {
|
|
745
753
|
o[prop] = (options.window || import_globals2.window).eval("(" + objProp.toString() + ")");
|
|
746
|
-
} else
|
|
754
|
+
} else {
|
|
747
755
|
o[prop] = objProp;
|
|
756
|
+
}
|
|
748
757
|
}
|
|
749
758
|
return o;
|
|
750
759
|
};
|
|
@@ -1203,6 +1212,25 @@ var require_object = __commonJS({
|
|
|
1203
1212
|
}
|
|
1204
1213
|
}
|
|
1205
1214
|
};
|
|
1215
|
+
var isCyclic = (obj) => {
|
|
1216
|
+
const seenObjects = [];
|
|
1217
|
+
function detect(obj2) {
|
|
1218
|
+
if (obj2 && typeof obj2 === "object") {
|
|
1219
|
+
if (seenObjects.indexOf(obj2) !== -1) {
|
|
1220
|
+
return true;
|
|
1221
|
+
}
|
|
1222
|
+
seenObjects.push(obj2);
|
|
1223
|
+
for (const key in obj2) {
|
|
1224
|
+
if (Object.hasOwnProperty.call(obj2, key) && detect(obj2[key])) {
|
|
1225
|
+
console.log(obj2, "cycle at " + key);
|
|
1226
|
+
return true;
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
return false;
|
|
1231
|
+
}
|
|
1232
|
+
return detect(obj);
|
|
1233
|
+
};
|
|
1206
1234
|
}
|
|
1207
1235
|
});
|
|
1208
1236
|
|
package/dist/cjs/system/index.js
CHANGED
|
@@ -606,6 +606,7 @@ var require_object = __commonJS({
|
|
|
606
606
|
exec: () => exec,
|
|
607
607
|
flattenRecursive: () => flattenRecursive,
|
|
608
608
|
hasOwnProperty: () => hasOwnProperty,
|
|
609
|
+
isCyclic: () => isCyclic,
|
|
609
610
|
isEmpty: () => isEmpty,
|
|
610
611
|
isEmptyObject: () => isEmptyObject,
|
|
611
612
|
isEqualDeep: () => isEqualDeep,
|
|
@@ -731,20 +732,28 @@ var require_object = __commonJS({
|
|
|
731
732
|
}
|
|
732
733
|
return clone2;
|
|
733
734
|
};
|
|
734
|
-
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}, visited = /* @__PURE__ */ new WeakSet()) => {
|
|
736
|
+
if ((0, import_types.isObjectLike)(obj)) {
|
|
737
|
+
if (visited.has(obj)) {
|
|
738
|
+
return obj;
|
|
739
|
+
}
|
|
740
|
+
visited.add(obj);
|
|
741
|
+
}
|
|
735
742
|
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
736
743
|
for (const prop in obj) {
|
|
737
744
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
745
|
continue;
|
|
739
746
|
const objProp = obj[prop];
|
|
740
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
747
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp)) {
|
|
741
748
|
continue;
|
|
749
|
+
}
|
|
742
750
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
743
|
-
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
751
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options, visited);
|
|
744
752
|
} else if ((0, import_types.isFunction)(objProp) && options.window) {
|
|
745
753
|
o[prop] = (options.window || import_globals3.window).eval("(" + objProp.toString() + ")");
|
|
746
|
-
} else
|
|
754
|
+
} else {
|
|
747
755
|
o[prop] = objProp;
|
|
756
|
+
}
|
|
748
757
|
}
|
|
749
758
|
return o;
|
|
750
759
|
};
|
|
@@ -1203,6 +1212,25 @@ var require_object = __commonJS({
|
|
|
1203
1212
|
}
|
|
1204
1213
|
}
|
|
1205
1214
|
};
|
|
1215
|
+
var isCyclic = (obj) => {
|
|
1216
|
+
const seenObjects = [];
|
|
1217
|
+
function detect(obj2) {
|
|
1218
|
+
if (obj2 && typeof obj2 === "object") {
|
|
1219
|
+
if (seenObjects.indexOf(obj2) !== -1) {
|
|
1220
|
+
return true;
|
|
1221
|
+
}
|
|
1222
|
+
seenObjects.push(obj2);
|
|
1223
|
+
for (const key in obj2) {
|
|
1224
|
+
if (Object.hasOwnProperty.call(obj2, key) && detect(obj2[key])) {
|
|
1225
|
+
console.log(obj2, "cycle at " + key);
|
|
1226
|
+
return true;
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
return false;
|
|
1231
|
+
}
|
|
1232
|
+
return detect(obj);
|
|
1233
|
+
};
|
|
1206
1234
|
}
|
|
1207
1235
|
});
|
|
1208
1236
|
|
package/dist/cjs/system/reset.js
CHANGED
|
@@ -606,6 +606,7 @@ var require_object = __commonJS({
|
|
|
606
606
|
exec: () => exec,
|
|
607
607
|
flattenRecursive: () => flattenRecursive,
|
|
608
608
|
hasOwnProperty: () => hasOwnProperty,
|
|
609
|
+
isCyclic: () => isCyclic,
|
|
609
610
|
isEmpty: () => isEmpty,
|
|
610
611
|
isEmptyObject: () => isEmptyObject,
|
|
611
612
|
isEqualDeep: () => isEqualDeep,
|
|
@@ -731,20 +732,28 @@ var require_object = __commonJS({
|
|
|
731
732
|
}
|
|
732
733
|
return clone2;
|
|
733
734
|
};
|
|
734
|
-
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}, visited = /* @__PURE__ */ new WeakSet()) => {
|
|
736
|
+
if ((0, import_types.isObjectLike)(obj)) {
|
|
737
|
+
if (visited.has(obj)) {
|
|
738
|
+
return obj;
|
|
739
|
+
}
|
|
740
|
+
visited.add(obj);
|
|
741
|
+
}
|
|
735
742
|
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
736
743
|
for (const prop in obj) {
|
|
737
744
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
745
|
continue;
|
|
739
746
|
const objProp = obj[prop];
|
|
740
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
747
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp)) {
|
|
741
748
|
continue;
|
|
749
|
+
}
|
|
742
750
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
743
|
-
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
751
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options, visited);
|
|
744
752
|
} else if ((0, import_types.isFunction)(objProp) && options.window) {
|
|
745
753
|
o[prop] = (options.window || import_globals2.window).eval("(" + objProp.toString() + ")");
|
|
746
|
-
} else
|
|
754
|
+
} else {
|
|
747
755
|
o[prop] = objProp;
|
|
756
|
+
}
|
|
748
757
|
}
|
|
749
758
|
return o;
|
|
750
759
|
};
|
|
@@ -1203,6 +1212,25 @@ var require_object = __commonJS({
|
|
|
1203
1212
|
}
|
|
1204
1213
|
}
|
|
1205
1214
|
};
|
|
1215
|
+
var isCyclic = (obj) => {
|
|
1216
|
+
const seenObjects = [];
|
|
1217
|
+
function detect(obj2) {
|
|
1218
|
+
if (obj2 && typeof obj2 === "object") {
|
|
1219
|
+
if (seenObjects.indexOf(obj2) !== -1) {
|
|
1220
|
+
return true;
|
|
1221
|
+
}
|
|
1222
|
+
seenObjects.push(obj2);
|
|
1223
|
+
for (const key in obj2) {
|
|
1224
|
+
if (Object.hasOwnProperty.call(obj2, key) && detect(obj2[key])) {
|
|
1225
|
+
console.log(obj2, "cycle at " + key);
|
|
1226
|
+
return true;
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
return false;
|
|
1231
|
+
}
|
|
1232
|
+
return detect(obj);
|
|
1233
|
+
};
|
|
1206
1234
|
}
|
|
1207
1235
|
});
|
|
1208
1236
|
|
|
@@ -606,6 +606,7 @@ var require_object = __commonJS({
|
|
|
606
606
|
exec: () => exec,
|
|
607
607
|
flattenRecursive: () => flattenRecursive,
|
|
608
608
|
hasOwnProperty: () => hasOwnProperty,
|
|
609
|
+
isCyclic: () => isCyclic,
|
|
609
610
|
isEmpty: () => isEmpty,
|
|
610
611
|
isEmptyObject: () => isEmptyObject,
|
|
611
612
|
isEqualDeep: () => isEqualDeep,
|
|
@@ -731,20 +732,28 @@ var require_object = __commonJS({
|
|
|
731
732
|
}
|
|
732
733
|
return clone2;
|
|
733
734
|
};
|
|
734
|
-
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}, visited = /* @__PURE__ */ new WeakSet()) => {
|
|
736
|
+
if ((0, import_types.isObjectLike)(obj)) {
|
|
737
|
+
if (visited.has(obj)) {
|
|
738
|
+
return obj;
|
|
739
|
+
}
|
|
740
|
+
visited.add(obj);
|
|
741
|
+
}
|
|
735
742
|
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
736
743
|
for (const prop in obj) {
|
|
737
744
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
745
|
continue;
|
|
739
746
|
const objProp = obj[prop];
|
|
740
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
747
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp)) {
|
|
741
748
|
continue;
|
|
749
|
+
}
|
|
742
750
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
743
|
-
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
751
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options, visited);
|
|
744
752
|
} else if ((0, import_types.isFunction)(objProp) && options.window) {
|
|
745
753
|
o[prop] = (options.window || import_globals2.window).eval("(" + objProp.toString() + ")");
|
|
746
|
-
} else
|
|
754
|
+
} else {
|
|
747
755
|
o[prop] = objProp;
|
|
756
|
+
}
|
|
748
757
|
}
|
|
749
758
|
return o;
|
|
750
759
|
};
|
|
@@ -1203,6 +1212,25 @@ var require_object = __commonJS({
|
|
|
1203
1212
|
}
|
|
1204
1213
|
}
|
|
1205
1214
|
};
|
|
1215
|
+
var isCyclic = (obj) => {
|
|
1216
|
+
const seenObjects = [];
|
|
1217
|
+
function detect(obj2) {
|
|
1218
|
+
if (obj2 && typeof obj2 === "object") {
|
|
1219
|
+
if (seenObjects.indexOf(obj2) !== -1) {
|
|
1220
|
+
return true;
|
|
1221
|
+
}
|
|
1222
|
+
seenObjects.push(obj2);
|
|
1223
|
+
for (const key in obj2) {
|
|
1224
|
+
if (Object.hasOwnProperty.call(obj2, key) && detect(obj2[key])) {
|
|
1225
|
+
console.log(obj2, "cycle at " + key);
|
|
1226
|
+
return true;
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
return false;
|
|
1231
|
+
}
|
|
1232
|
+
return detect(obj);
|
|
1233
|
+
};
|
|
1206
1234
|
}
|
|
1207
1235
|
});
|
|
1208
1236
|
|
|
@@ -2615,6 +2615,7 @@ var require_object = __commonJS({
|
|
|
2615
2615
|
exec: () => exec,
|
|
2616
2616
|
flattenRecursive: () => flattenRecursive,
|
|
2617
2617
|
hasOwnProperty: () => hasOwnProperty,
|
|
2618
|
+
isCyclic: () => isCyclic,
|
|
2618
2619
|
isEmpty: () => isEmpty,
|
|
2619
2620
|
isEmptyObject: () => isEmptyObject,
|
|
2620
2621
|
isEqualDeep: () => isEqualDeep,
|
|
@@ -2740,20 +2741,28 @@ var require_object = __commonJS({
|
|
|
2740
2741
|
}
|
|
2741
2742
|
return clone2;
|
|
2742
2743
|
};
|
|
2743
|
-
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
2744
|
+
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}, visited = /* @__PURE__ */ new WeakSet()) => {
|
|
2745
|
+
if ((0, import_types.isObjectLike)(obj)) {
|
|
2746
|
+
if (visited.has(obj)) {
|
|
2747
|
+
return obj;
|
|
2748
|
+
}
|
|
2749
|
+
visited.add(obj);
|
|
2750
|
+
}
|
|
2744
2751
|
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
2745
2752
|
for (const prop in obj) {
|
|
2746
2753
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2747
2754
|
continue;
|
|
2748
2755
|
const objProp = obj[prop];
|
|
2749
|
-
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
2756
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp)) {
|
|
2750
2757
|
continue;
|
|
2758
|
+
}
|
|
2751
2759
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2752
|
-
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
2760
|
+
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options, visited);
|
|
2753
2761
|
} else if ((0, import_types.isFunction)(objProp) && options.window) {
|
|
2754
2762
|
o[prop] = (options.window || import_globals2.window).eval("(" + objProp.toString() + ")");
|
|
2755
|
-
} else
|
|
2763
|
+
} else {
|
|
2756
2764
|
o[prop] = objProp;
|
|
2765
|
+
}
|
|
2757
2766
|
}
|
|
2758
2767
|
return o;
|
|
2759
2768
|
};
|
|
@@ -3212,6 +3221,25 @@ var require_object = __commonJS({
|
|
|
3212
3221
|
}
|
|
3213
3222
|
}
|
|
3214
3223
|
};
|
|
3224
|
+
var isCyclic = (obj) => {
|
|
3225
|
+
const seenObjects = [];
|
|
3226
|
+
function detect(obj2) {
|
|
3227
|
+
if (obj2 && typeof obj2 === "object") {
|
|
3228
|
+
if (seenObjects.indexOf(obj2) !== -1) {
|
|
3229
|
+
return true;
|
|
3230
|
+
}
|
|
3231
|
+
seenObjects.push(obj2);
|
|
3232
|
+
for (const key in obj2) {
|
|
3233
|
+
if (Object.hasOwnProperty.call(obj2, key) && detect(obj2[key])) {
|
|
3234
|
+
console.log(obj2, "cycle at " + key);
|
|
3235
|
+
return true;
|
|
3236
|
+
}
|
|
3237
|
+
}
|
|
3238
|
+
}
|
|
3239
|
+
return false;
|
|
3240
|
+
}
|
|
3241
|
+
return detect(obj);
|
|
3242
|
+
};
|
|
3215
3243
|
}
|
|
3216
3244
|
});
|
|
3217
3245
|
|