@domql/utils 2.5.91 → 2.5.92
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 +1 -1
- package/object.js +11 -1
- package/package.json +2 -2
package/dist/cjs/object.js
CHANGED
|
@@ -262,7 +262,7 @@ const deepDestringify = (obj, destringified = {}) => {
|
|
|
262
262
|
continue;
|
|
263
263
|
const objProp = obj[prop];
|
|
264
264
|
if ((0, import_types.isString)(objProp)) {
|
|
265
|
-
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
265
|
+
if ((objProp.includes("(){") || objProp.includes("() {") || objProp.includes("=>") || objProp.startsWith("()") || objProp.startsWith("async") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
266
266
|
try {
|
|
267
267
|
const evalProp = import_globals.window.eval(`(${objProp})`);
|
|
268
268
|
destringified[prop] = evalProp;
|
package/object.js
CHANGED
|
@@ -249,7 +249,17 @@ export const deepDestringify = (obj, destringified = {}) => {
|
|
|
249
249
|
if (!hasOwnProperty) continue
|
|
250
250
|
const objProp = obj[prop]
|
|
251
251
|
if (isString(objProp)) {
|
|
252
|
-
if ((
|
|
252
|
+
if ((
|
|
253
|
+
objProp.includes('(){') ||
|
|
254
|
+
objProp.includes('() {') ||
|
|
255
|
+
objProp.includes('=>') ||
|
|
256
|
+
objProp.startsWith('()') ||
|
|
257
|
+
objProp.startsWith('async') ||
|
|
258
|
+
objProp.startsWith('function') ||
|
|
259
|
+
objProp.startsWith('(')
|
|
260
|
+
) &&
|
|
261
|
+
!objProp.startsWith('{') && !objProp.startsWith('[')
|
|
262
|
+
) {
|
|
253
263
|
try {
|
|
254
264
|
const evalProp = window.eval(`(${objProp})`)
|
|
255
265
|
destringified[prop] = evalProp
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/utils",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.92",
|
|
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": "41f831e7064481d010f7a763e9466931c6389f87",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/core": "^7.12.0"
|
|
29
29
|
}
|