@domql/utils 2.3.9 → 2.3.12
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/index.js +1 -0
- package/log.js +10 -0
- package/package.json +2 -2
- package/types.js +9 -1
package/index.js
CHANGED
package/log.js
ADDED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/utils",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.12",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@domql/tags": "latest"
|
|
8
8
|
},
|
|
9
|
-
"gitHead": "
|
|
9
|
+
"gitHead": "3e4765dd6eed427b88443d8227de6574bff1c1bb",
|
|
10
10
|
"source": "index.js"
|
|
11
11
|
}
|
package/types.js
CHANGED
|
@@ -15,6 +15,10 @@ export const isNumber = arg => typeof arg === 'number'
|
|
|
15
15
|
|
|
16
16
|
export const isFunction = arg => typeof arg === 'function'
|
|
17
17
|
|
|
18
|
+
export const isBoolean = arg => arg === true || arg === false
|
|
19
|
+
|
|
20
|
+
export const isNull = arg => arg === null
|
|
21
|
+
|
|
18
22
|
export const isArray = arg => Array.isArray(arg)
|
|
19
23
|
|
|
20
24
|
export const isObjectLike = arg => {
|
|
@@ -46,14 +50,18 @@ export const isDefined = arg => {
|
|
|
46
50
|
isNumber(arg) ||
|
|
47
51
|
isFunction(arg) ||
|
|
48
52
|
isArray(arg) ||
|
|
49
|
-
isObjectLike(arg)
|
|
53
|
+
isObjectLike(arg) ||
|
|
54
|
+
isBoolean(arg) ||
|
|
55
|
+
isNull(arg)
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
export const TYPES = {
|
|
59
|
+
boolean: isBoolean,
|
|
53
60
|
array: isArray,
|
|
54
61
|
object: isObject,
|
|
55
62
|
string: isString,
|
|
56
63
|
number: isNumber,
|
|
64
|
+
null: isNull,
|
|
57
65
|
function: isFunction,
|
|
58
66
|
objectLike: isObjectLike,
|
|
59
67
|
node: isNode,
|