@domql/utils 2.5.153 → 2.5.156

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/component.js CHANGED
@@ -51,7 +51,7 @@ export const checkIfSugar = (element, parent, key) => {
51
51
  const hasComponentAttrs = extend || childExtend || props || on || $collection || $stateCollection || $propsCollection
52
52
  if (hasComponentAttrs && (childProps || extendProps || children || childExtends)) {
53
53
  const logErr = (parent || element)?.error
54
- if (logErr) logErr('Sugar component includes params for builtin components', { verbose: true })
54
+ if (logErr) logErr.call(element, 'Sugar component includes params for builtin components', { verbose: true })
55
55
  }
56
56
  return !hasComponentAttrs || childProps || extendProps || children || childExtends
57
57
  }
@@ -78,7 +78,7 @@ const checkIfSugar = (element, parent, key) => {
78
78
  if (hasComponentAttrs && (childProps || extendProps || children || childExtends)) {
79
79
  const logErr = (_a = parent || element) == null ? void 0 : _a.error;
80
80
  if (logErr)
81
- logErr("Sugar component includes params for builtin components", { verbose: true });
81
+ logErr.call(element, "Sugar component includes params for builtin components", { verbose: true });
82
82
  }
83
83
  return !hasComponentAttrs || childProps || extendProps || children || childExtends;
84
84
  };
@@ -264,7 +264,7 @@ const objectToString = (obj = {}, indent = 0) => {
264
264
  if ((0, import_types.isArray)(value)) {
265
265
  str += "[\n";
266
266
  for (const element of value) {
267
- if ((0, import_types.isObject)(element) && element !== null) {
267
+ if ((0, import_types.isObjectLike)(element) && element !== null) {
268
268
  str += `${spaces} ${objectToString(element, indent + 2)},
269
269
  `;
270
270
  } else if ((0, import_types.isString)(element)) {
package/object.js CHANGED
@@ -295,7 +295,7 @@ export const objectToString = (obj = {}, indent = 0) => {
295
295
  if (isArray(value)) {
296
296
  str += '[\n'
297
297
  for (const element of value) {
298
- if (isObject(element) && element !== null) {
298
+ if (isObjectLike(element) && element !== null) {
299
299
  str += `${spaces} ${objectToString(element, indent + 2)},\n`
300
300
  } else if (isString(element)) {
301
301
  // if (element.includes('\n')) str += spaces + ' ' + '`' + element + '`,\n'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/utils",
3
- "version": "2.5.153",
3
+ "version": "2.5.156",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "index.js",
@@ -25,7 +25,7 @@
25
25
  "build": "yarn build:cjs",
26
26
  "prepublish": "rimraf -I dist && yarn build && yarn copy:package:cjs"
27
27
  },
28
- "gitHead": "ebf5debf658fdae4ec5a99b541b2518c7767e6a8",
28
+ "gitHead": "7e5943ccb3e1b2dd5386d2cfb31474ef446e1521",
29
29
  "devDependencies": {
30
30
  "@babel/core": "^7.12.0"
31
31
  }