@domql/state 2.5.2 → 2.5.7
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/create.js +5 -7
- package/dist/cjs/create.js +5 -7
- package/inherit.js +1 -0
- package/package.json +2 -2
package/create.js
CHANGED
|
@@ -53,20 +53,18 @@ const checkForTypes = (element) => {
|
|
|
53
53
|
if (isFunction(state)) {
|
|
54
54
|
ref.__state = state
|
|
55
55
|
return exec(state, element)
|
|
56
|
-
}
|
|
57
|
-
if (is(state)('string', 'number')) {
|
|
56
|
+
} else if (is(state)('string', 'number')) {
|
|
58
57
|
ref.__state = state
|
|
59
58
|
return {}
|
|
60
|
-
}
|
|
61
|
-
if (state === true) {
|
|
59
|
+
} else if (state === true) {
|
|
62
60
|
ref.__state = element.key
|
|
63
61
|
return {}
|
|
64
|
-
}
|
|
65
|
-
if (state) {
|
|
62
|
+
} else if (state) {
|
|
66
63
|
ref.__hasRootState = true
|
|
67
64
|
return state
|
|
65
|
+
} else {
|
|
66
|
+
return false
|
|
68
67
|
}
|
|
69
|
-
return false
|
|
70
68
|
}
|
|
71
69
|
|
|
72
70
|
const addProtoToArray = (state, proto) => {
|
package/dist/cjs/create.js
CHANGED
|
@@ -66,20 +66,18 @@ const checkForTypes = (element) => {
|
|
|
66
66
|
if ((0, import_utils.isFunction)(state)) {
|
|
67
67
|
ref.__state = state;
|
|
68
68
|
return (0, import_utils.exec)(state, element);
|
|
69
|
-
}
|
|
70
|
-
if ((0, import_utils.is)(state)("string", "number")) {
|
|
69
|
+
} else if ((0, import_utils.is)(state)("string", "number")) {
|
|
71
70
|
ref.__state = state;
|
|
72
71
|
return {};
|
|
73
|
-
}
|
|
74
|
-
if (state === true) {
|
|
72
|
+
} else if (state === true) {
|
|
75
73
|
ref.__state = element.key;
|
|
76
74
|
return {};
|
|
77
|
-
}
|
|
78
|
-
if (state) {
|
|
75
|
+
} else if (state) {
|
|
79
76
|
ref.__hasRootState = true;
|
|
80
77
|
return state;
|
|
78
|
+
} else {
|
|
79
|
+
return false;
|
|
81
80
|
}
|
|
82
|
-
return false;
|
|
83
81
|
};
|
|
84
82
|
const addProtoToArray = (state, proto) => {
|
|
85
83
|
for (const key in proto) {
|
package/inherit.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/state",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"@domql/report": "latest",
|
|
32
32
|
"@domql/utils": "latest"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "fe6520d996b2ca837f6965928a51360ea91e9695"
|
|
35
35
|
}
|