@domql/utils 2.5.80 → 2.5.81
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/object.js +0 -8
- package/object.js +8 -8
- package/package.json +2 -2
package/dist/cjs/object.js
CHANGED
|
@@ -137,10 +137,6 @@ const deepClone = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
|
137
137
|
for (const prop in obj) {
|
|
138
138
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
139
139
|
continue;
|
|
140
|
-
if (prop === "node" || prop === "parent" || prop === "root" || prop === "__element") {
|
|
141
|
-
console.warn("recursive clonning is called", obj);
|
|
142
|
-
continue;
|
|
143
|
-
}
|
|
144
140
|
if (prop === "__proto__")
|
|
145
141
|
continue;
|
|
146
142
|
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
@@ -163,10 +159,6 @@ const deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
|
163
159
|
for (const prop in obj) {
|
|
164
160
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
165
161
|
continue;
|
|
166
|
-
if (prop === "node" || prop === "parent" || prop === "root" || prop === "__element") {
|
|
167
|
-
console.warn("recursive clonning is called", obj);
|
|
168
|
-
continue;
|
|
169
|
-
}
|
|
170
162
|
const objProp = obj[prop];
|
|
171
163
|
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
172
164
|
continue;
|
package/object.js
CHANGED
|
@@ -99,10 +99,10 @@ export const deepClone = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
|
99
99
|
const o = isArray(obj) ? [] : {}
|
|
100
100
|
for (const prop in obj) {
|
|
101
101
|
if (!Object.prototype.hasOwnProperty.call(obj, prop)) continue
|
|
102
|
-
if (prop === 'node' || prop === 'parent' || prop === 'root' || prop === '__element') {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
102
|
+
// if (prop === 'node' || prop === 'parent' || prop === 'root' || prop === '__element') {
|
|
103
|
+
// console.warn('recursive clonning is called', obj)
|
|
104
|
+
// continue
|
|
105
|
+
// }
|
|
106
106
|
if (prop === '__proto__') continue
|
|
107
107
|
if (excludeFrom.includes(prop) || prop.startsWith('__')) continue
|
|
108
108
|
let objProp = obj[prop]
|
|
@@ -126,10 +126,10 @@ export const deepCloneWithExtend = (obj, excludeFrom = ['node'], options = {}) =
|
|
|
126
126
|
const o = isArray(obj) ? [] : {}
|
|
127
127
|
for (const prop in obj) {
|
|
128
128
|
if (!Object.prototype.hasOwnProperty.call(obj, prop)) continue
|
|
129
|
-
if (prop === 'node' || prop === 'parent' || prop === 'root' || prop === '__element') {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
129
|
+
// if (prop === 'node' || prop === 'parent' || prop === 'root' || prop === '__element') {
|
|
130
|
+
// console.warn('recursive clonning is called', obj)
|
|
131
|
+
// continue
|
|
132
|
+
// }
|
|
133
133
|
const objProp = obj[prop]
|
|
134
134
|
if (
|
|
135
135
|
excludeFrom.includes(prop) || prop.startsWith('__') ||
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/utils",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.81",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"build": "yarn build:cjs",
|
|
24
24
|
"prepublish": "rimraf -I dist && yarn build && yarn copy:package:cjs"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "450e26c2ab4a2646dd0f51bd412b9152bff9c898",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/core": "^7.12.0"
|
|
29
29
|
}
|