@domql/utils 2.31.37 → 2.32.0
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/dist/esm/object.js +2 -2
- package/object.js +2 -2
- package/package.json +2 -2
package/dist/cjs/object.js
CHANGED
|
@@ -63,7 +63,7 @@ var import_array = require("./array.js");
|
|
|
63
63
|
var import_string = require("./string.js");
|
|
64
64
|
var import_node = require("./node.js");
|
|
65
65
|
var import_env = require("./env.js");
|
|
66
|
-
function exec(param, element, state, context) {
|
|
66
|
+
function exec(param, element, state, context, opts = {}) {
|
|
67
67
|
if (!element) element = this;
|
|
68
68
|
if ((0, import_types.isFunction)(param)) {
|
|
69
69
|
try {
|
|
@@ -79,7 +79,7 @@ function exec(param, element, state, context) {
|
|
|
79
79
|
return result;
|
|
80
80
|
} catch (e) {
|
|
81
81
|
element.log(param);
|
|
82
|
-
element.warn("Error executing function", e);
|
|
82
|
+
element.warn("Error executing function", e, opts);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
return param;
|
package/dist/esm/object.js
CHANGED
|
@@ -33,7 +33,7 @@ import { mergeAndCloneIfArray, mergeArray } from "./array.js";
|
|
|
33
33
|
import { stringIncludesAny } from "./string.js";
|
|
34
34
|
import { isDOMNode } from "./node.js";
|
|
35
35
|
import { isNotProduction } from "./env.js";
|
|
36
|
-
function exec(param, element, state, context) {
|
|
36
|
+
function exec(param, element, state, context, opts = {}) {
|
|
37
37
|
if (!element) element = this;
|
|
38
38
|
if (isFunction(param)) {
|
|
39
39
|
try {
|
|
@@ -49,7 +49,7 @@ function exec(param, element, state, context) {
|
|
|
49
49
|
return result;
|
|
50
50
|
} catch (e) {
|
|
51
51
|
element.log(param);
|
|
52
|
-
element.warn("Error executing function", e);
|
|
52
|
+
element.warn("Error executing function", e, opts);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
return param;
|
package/object.js
CHANGED
|
@@ -30,7 +30,7 @@ import { isNotProduction } from './env.js'
|
|
|
30
30
|
* @param {Object} context - The context to pass to the function
|
|
31
31
|
* @returns {any|Promise} - The result or a Promise to the result
|
|
32
32
|
*/
|
|
33
|
-
export function exec(param, element, state, context) {
|
|
33
|
+
export function exec(param, element, state, context, opts = {}) {
|
|
34
34
|
if (!element) element = this
|
|
35
35
|
if (isFunction(param)) {
|
|
36
36
|
try {
|
|
@@ -51,7 +51,7 @@ export function exec(param, element, state, context) {
|
|
|
51
51
|
return result
|
|
52
52
|
} catch (e) {
|
|
53
53
|
element.log(param)
|
|
54
|
-
element.warn('Error executing function', e)
|
|
54
|
+
element.warn('Error executing function', e, opts)
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
return param
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/utils",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.32.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"build": "npx rimraf -I dist; npm run build:cjs; npm run build:esm",
|
|
25
25
|
"prepublish": "npm run build; npm run copy:package:cjs"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "6f087b0fe036c41c8f7d620ed67c24d25e371cc6",
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/core": "^7.27.1"
|
|
30
30
|
}
|