@domql/utils 2.3.70 → 2.3.74
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 +8 -3
- package/object.js +8 -2
- package/package.json +2 -2
package/dist/cjs/object.js
CHANGED
|
@@ -41,9 +41,14 @@ __export(object_exports, {
|
|
|
41
41
|
module.exports = __toCommonJS(object_exports);
|
|
42
42
|
var import_globals = require("@domql/globals");
|
|
43
43
|
var import_types = require("./types.js");
|
|
44
|
-
const exec = (param, element, state) => {
|
|
45
|
-
if ((0, import_types.isFunction)(param))
|
|
46
|
-
return param(
|
|
44
|
+
const exec = (param, element, state, context) => {
|
|
45
|
+
if ((0, import_types.isFunction)(param)) {
|
|
46
|
+
return param(
|
|
47
|
+
element,
|
|
48
|
+
state || element.state,
|
|
49
|
+
context || element.context
|
|
50
|
+
);
|
|
51
|
+
}
|
|
47
52
|
return param;
|
|
48
53
|
};
|
|
49
54
|
const map = (obj, extention, element) => {
|
package/object.js
CHANGED
|
@@ -3,8 +3,14 @@
|
|
|
3
3
|
import { window } from '@domql/globals'
|
|
4
4
|
import { isFunction, isObjectLike, isObject, isArray, isString } from './types.js'
|
|
5
5
|
|
|
6
|
-
export const exec = (param, element, state) => {
|
|
7
|
-
if (isFunction(param))
|
|
6
|
+
export const exec = (param, element, state, context) => {
|
|
7
|
+
if (isFunction(param)) {
|
|
8
|
+
return param(
|
|
9
|
+
element,
|
|
10
|
+
state || element.state,
|
|
11
|
+
context || element.context
|
|
12
|
+
)
|
|
13
|
+
}
|
|
8
14
|
return param
|
|
9
15
|
}
|
|
10
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/utils",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.74",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "index.js",
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"@domql/globals": "latest",
|
|
23
23
|
"@domql/tags": "latest"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "93687b695be15ccf6f10ff345186d8cc51a73e8b"
|
|
26
26
|
}
|