@domql/utils 2.5.38 → 2.5.42
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 +2 -2
- package/object.js +2 -2
- package/package.json +2 -2
package/dist/cjs/object.js
CHANGED
|
@@ -163,7 +163,7 @@ const deepCloneWithExtnd = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
|
163
163
|
if (cleanUndefined && (0, import_types.isUndefined)(objProp))
|
|
164
164
|
continue;
|
|
165
165
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
166
|
-
o[prop] =
|
|
166
|
+
o[prop] = deepCloneWithExtnd(objProp, excludeFrom, cleanUndefined);
|
|
167
167
|
} else
|
|
168
168
|
o[prop] = objProp;
|
|
169
169
|
}
|
|
@@ -199,7 +199,7 @@ const objectToString = (obj, indent = 0) => {
|
|
|
199
199
|
const spaces = " ".repeat(indent);
|
|
200
200
|
let str = "{\n";
|
|
201
201
|
for (const [key, value] of Object.entries(obj)) {
|
|
202
|
-
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "@", ".", "/", "!", " "]);
|
|
202
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["&", "*", "-", ":", "%", "{", "}", ">", "<", "@", ".", "/", "!", " "]);
|
|
203
203
|
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
204
204
|
str += `${spaces} ${stringedKey}: `;
|
|
205
205
|
if ((0, import_types.isArray)(value)) {
|
package/object.js
CHANGED
|
@@ -122,7 +122,7 @@ export const deepCloneWithExtnd = (obj, excludeFrom = [], cleanUndefined = false
|
|
|
122
122
|
const objProp = obj[prop]
|
|
123
123
|
if (cleanUndefined && isUndefined(objProp)) continue
|
|
124
124
|
if (isObjectLike(objProp)) {
|
|
125
|
-
o[prop] =
|
|
125
|
+
o[prop] = deepCloneWithExtnd(objProp, excludeFrom, cleanUndefined)
|
|
126
126
|
} else o[prop] = objProp
|
|
127
127
|
}
|
|
128
128
|
return o
|
|
@@ -163,7 +163,7 @@ export const objectToString = (obj, indent = 0) => {
|
|
|
163
163
|
let str = '{\n'
|
|
164
164
|
|
|
165
165
|
for (const [key, value] of Object.entries(obj)) {
|
|
166
|
-
const keyNotAllowdChars = stringIncludesAny(key, ['&', '*', '-', ':', '@', '.', '/', '!', ' '])
|
|
166
|
+
const keyNotAllowdChars = stringIncludesAny(key, ['&', '*', '-', ':', '%', '{', '}', '>', '<', '@', '.', '/', '!', ' '])
|
|
167
167
|
const stringedKey = keyNotAllowdChars ? `'${key}'` : key
|
|
168
168
|
str += `${spaces} ${stringedKey}: `
|
|
169
169
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/utils",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.42",
|
|
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": "76fbbf8ab997ee90fc3a791b21e49677d1b53993",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/core": "^7.12.0"
|
|
29
29
|
}
|