@domql/utils 2.28.28 → 2.28.29
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 +3 -2
- package/dist/esm/object.js +3 -2
- package/object.js +2 -1
- package/package.json +2 -2
package/dist/cjs/object.js
CHANGED
|
@@ -64,7 +64,8 @@ var import_array = require("./array.js");
|
|
|
64
64
|
var import_string = require("./string.js");
|
|
65
65
|
var import_node = require("./node.js");
|
|
66
66
|
var import_env = require("./env.js");
|
|
67
|
-
|
|
67
|
+
function exec(param, element, state, context) {
|
|
68
|
+
if (!element) element = this;
|
|
68
69
|
if ((0, import_types.isFunction)(param)) {
|
|
69
70
|
try {
|
|
70
71
|
const result = param.call(
|
|
@@ -85,7 +86,7 @@ const exec = (param, element, state, context) => {
|
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
88
|
return param;
|
|
88
|
-
}
|
|
89
|
+
}
|
|
89
90
|
const map = (obj, extention, element) => {
|
|
90
91
|
for (const e in extention) {
|
|
91
92
|
obj[e] = exec(extention[e], element);
|
package/dist/esm/object.js
CHANGED
|
@@ -33,7 +33,8 @@ 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
|
-
|
|
36
|
+
function exec(param, element, state, context) {
|
|
37
|
+
if (!element) element = this;
|
|
37
38
|
if (isFunction(param)) {
|
|
38
39
|
try {
|
|
39
40
|
const result = param.call(
|
|
@@ -54,7 +55,7 @@ const exec = (param, element, state, context) => {
|
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
return param;
|
|
57
|
-
}
|
|
58
|
+
}
|
|
58
59
|
const map = (obj, extention, element) => {
|
|
59
60
|
for (const e in extention) {
|
|
60
61
|
obj[e] = exec(extention[e], element);
|
package/object.js
CHANGED
|
@@ -30,7 +30,8 @@ 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
|
|
33
|
+
export function exec (param, element, state, context) {
|
|
34
|
+
if (!element) element = this
|
|
34
35
|
if (isFunction(param)) {
|
|
35
36
|
try {
|
|
36
37
|
// Call the function with the specified context and parameters
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/utils",
|
|
3
|
-
"version": "2.28.
|
|
3
|
+
"version": "2.28.29",
|
|
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": "68b0db7512c1c79ed132143f7adcc1f19f234d37",
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/core": "^7.26.0"
|
|
30
30
|
}
|