@domql/utils 2.3.147 → 2.3.150
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 +6 -0
- package/object.js +3 -0
- package/package.json +2 -2
package/dist/cjs/object.js
CHANGED
|
@@ -76,6 +76,8 @@ const merge = (element, obj, excludeFrom = []) => {
|
|
|
76
76
|
};
|
|
77
77
|
const deepMerge = (element, extend, excludeFrom = []) => {
|
|
78
78
|
for (const e in extend) {
|
|
79
|
+
if (e === "__proto__")
|
|
80
|
+
continue;
|
|
79
81
|
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
80
82
|
continue;
|
|
81
83
|
const elementProp = element[e];
|
|
@@ -225,6 +227,8 @@ const detachFunctionsFromObject = (obj, detached = {}) => {
|
|
|
225
227
|
};
|
|
226
228
|
const deepDestringify = (obj, stringified = {}) => {
|
|
227
229
|
for (const prop in obj) {
|
|
230
|
+
if (prop === "__proto__")
|
|
231
|
+
continue;
|
|
228
232
|
const objProp = obj[prop];
|
|
229
233
|
if ((0, import_types.isString)(objProp)) {
|
|
230
234
|
if (objProp.includes("=>") || objProp.includes("function") || objProp.startsWith("(")) {
|
|
@@ -343,6 +347,8 @@ const overwriteShallow = (obj, params, excludeFrom = []) => {
|
|
|
343
347
|
};
|
|
344
348
|
const overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
345
349
|
for (const e in params) {
|
|
350
|
+
if (e === "__proto__")
|
|
351
|
+
continue;
|
|
346
352
|
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
347
353
|
continue;
|
|
348
354
|
const objProp = obj[e];
|
package/object.js
CHANGED
|
@@ -36,6 +36,7 @@ export const merge = (element, obj, excludeFrom = []) => {
|
|
|
36
36
|
|
|
37
37
|
export const deepMerge = (element, extend, excludeFrom = []) => {
|
|
38
38
|
for (const e in extend) {
|
|
39
|
+
if (e === '__proto__') continue
|
|
39
40
|
if (excludeFrom.includes(e) || e.startsWith('__')) continue
|
|
40
41
|
const elementProp = element[e]
|
|
41
42
|
const extendProp = extend[e]
|
|
@@ -205,6 +206,7 @@ export const detachFunctionsFromObject = (obj, detached = {}) => {
|
|
|
205
206
|
*/
|
|
206
207
|
export const deepDestringify = (obj, stringified = {}) => {
|
|
207
208
|
for (const prop in obj) {
|
|
209
|
+
if (prop === '__proto__') continue
|
|
208
210
|
const objProp = obj[prop]
|
|
209
211
|
if (isString(objProp)) {
|
|
210
212
|
if (objProp.includes('=>') || objProp.includes('function') || objProp.startsWith('(')) {
|
|
@@ -332,6 +334,7 @@ export const overwriteShallow = (obj, params, excludeFrom = []) => {
|
|
|
332
334
|
*/
|
|
333
335
|
export const overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
334
336
|
for (const e in params) {
|
|
337
|
+
if (e === '__proto__') continue
|
|
335
338
|
if (excludeFrom.includes(e) || e.startsWith('__')) continue
|
|
336
339
|
const objProp = obj[e]
|
|
337
340
|
const paramsProp = params[e]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/utils",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.150",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@domql/key": "latest",
|
|
24
24
|
"@domql/tags": "latest"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "368c731d0e9f7225329b235dfa446d41a36a341c",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/core": "^7.12.0"
|
|
29
29
|
}
|