@thi.ng/checks 3.0.2 → 3.0.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/CHANGELOG.md CHANGED
@@ -3,17 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [3.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@3.0.1...@thi.ng/checks@3.0.2) (2021-10-15)
6
+ ## [3.0.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@3.0.6...@thi.ng/checks@3.0.7) (2021-11-10)
7
7
 
8
- **Note:** Version bump only for package @thi.ng/checks
9
8
 
9
+ ### Bug Fixes
10
10
 
11
-
12
-
13
-
14
- ## [3.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@3.0.0...@thi.ng/checks@3.0.1) (2021-10-13)
15
-
16
- **Note:** Version bump only for package @thi.ng/checks
11
+ * **checks:** add boolean to isPrimitive() ([fde4d2b](https://github.com/thi-ng/umbrella/commit/fde4d2b6aab02887e12f14c75fccf37b686844ae))
17
12
 
18
13
 
19
14
 
@@ -48,139 +43,139 @@ Also:
48
43
 
49
44
 
50
45
 
51
- # [2.9.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.8.0...@thi.ng/checks@2.9.0) (2021-02-20)
46
+ # [2.9.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.8.0...@thi.ng/checks@2.9.0) (2021-02-20)
52
47
 
53
- ### Features
48
+ ### Features
54
49
 
55
- - **checks:** add isIllegalKey() (make public) ([507fc80](https://github.com/thi-ng/umbrella/commit/507fc806903e766e42a98ddd569ba4031925204b))
56
- - **checks:** replace isPrototypePolluted() w/ isProtoPath() ([d276b84](https://github.com/thi-ng/umbrella/commit/d276b8465eda21a32f3613d20c043ea50fce7f57))
50
+ - **checks:** add isIllegalKey() (make public) ([507fc80](https://github.com/thi-ng/umbrella/commit/507fc806903e766e42a98ddd569ba4031925204b))
51
+ - **checks:** replace isPrototypePolluted() w/ isProtoPath() ([d276b84](https://github.com/thi-ng/umbrella/commit/d276b8465eda21a32f3613d20c043ea50fce7f57))
57
52
 
58
- # [2.8.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.7.13...@thi.ng/checks@2.8.0) (2021-01-10)
53
+ # [2.8.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.7.13...@thi.ng/checks@2.8.0) (2021-01-10)
59
54
 
60
- ### Features
55
+ ### Features
61
56
 
62
- - **checks:** add isNumericInt/Float() checks ([7e054c1](https://github.com/thi-ng/umbrella/commit/7e054c14b06850800869ba0bc8c8174e233dda53))
57
+ - **checks:** add isNumericInt/Float() checks ([7e054c1](https://github.com/thi-ng/umbrella/commit/7e054c14b06850800869ba0bc8c8174e233dda53))
63
58
 
64
- ## [2.7.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.7.2...@thi.ng/checks@2.7.3) (2020-07-02)
59
+ ## [2.7.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.7.2...@thi.ng/checks@2.7.3) (2020-07-02)
65
60
 
66
- ### Bug Fixes
61
+ ### Bug Fixes
67
62
 
68
- - **checks:** update isPlainObject() type assertion ([e5ceb7d](https://github.com/thi-ng/umbrella/commit/e5ceb7d3e1ef5be7a4e83319ab1c36bbc3e1b1a8))
63
+ - **checks:** update isPlainObject() type assertion ([e5ceb7d](https://github.com/thi-ng/umbrella/commit/e5ceb7d3e1ef5be7a4e83319ab1c36bbc3e1b1a8))
69
64
 
70
- # [2.7.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.6.5...@thi.ng/checks@2.7.0) (2020-05-14)
65
+ # [2.7.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.6.5...@thi.ng/checks@2.7.0) (2020-05-14)
71
66
 
72
- ### Features
67
+ ### Features
73
68
 
74
- - **checks:** add isAsyncIterable() ([59ac3a9](https://github.com/thi-ng/umbrella/commit/59ac3a9ea2588bf8afc0a8e9bfed72ffb875c47d))
69
+ - **checks:** add isAsyncIterable() ([59ac3a9](https://github.com/thi-ng/umbrella/commit/59ac3a9ea2588bf8afc0a8e9bfed72ffb875c47d))
75
70
 
76
- # [2.6.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.5.4...@thi.ng/checks@2.6.0) (2020-03-28)
71
+ # [2.6.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.5.4...@thi.ng/checks@2.6.0) (2020-03-28)
77
72
 
78
- ### Bug Fixes
73
+ ### Bug Fixes
79
74
 
80
- - **checks:** typo ([4e4a6e1](https://github.com/thi-ng/umbrella/commit/4e4a6e1062075705d96883f860f23b545fd9ebdf))
75
+ - **checks:** typo ([4e4a6e1](https://github.com/thi-ng/umbrella/commit/4e4a6e1062075705d96883f860f23b545fd9ebdf))
81
76
 
82
- ### Features
77
+ ### Features
83
78
 
84
- - **checks:** add better type assertion for isTypedArray() ([548ba52](https://github.com/thi-ng/umbrella/commit/548ba5205033bcc4a917fa56ede65ba3df4b3eef))
85
- - **checks:** add new string validators ([9d9e8a8](https://github.com/thi-ng/umbrella/commit/9d9e8a8bcb73efb728faf4a216a9dfcac31a0639))
79
+ - **checks:** add better type assertion for isTypedArray() ([548ba52](https://github.com/thi-ng/umbrella/commit/548ba5205033bcc4a917fa56ede65ba3df4b3eef))
80
+ - **checks:** add new string validators ([9d9e8a8](https://github.com/thi-ng/umbrella/commit/9d9e8a8bcb73efb728faf4a216a9dfcac31a0639))
86
81
 
87
- # [2.5.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.4.2...@thi.ng/checks@2.5.0) (2020-01-24)
82
+ # [2.5.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.4.2...@thi.ng/checks@2.5.0) (2020-01-24)
88
83
 
89
- ### Features
84
+ ### Features
90
85
 
91
- - **checks:** add hasBigInt() ([aa4faed](https://github.com/thi-ng/umbrella/commit/aa4faed08362caa591f64d1ffce75e8d9e213dd9))
86
+ - **checks:** add hasBigInt() ([aa4faed](https://github.com/thi-ng/umbrella/commit/aa4faed08362caa591f64d1ffce75e8d9e213dd9))
92
87
 
93
- # [2.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.3.0...@thi.ng/checks@2.4.0) (2019-09-21)
88
+ # [2.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.3.0...@thi.ng/checks@2.4.0) (2019-09-21)
94
89
 
95
- ### Features
90
+ ### Features
96
91
 
97
- - **checks:** add generics to existsAndNotNull() ([bced8b9](https://github.com/thi-ng/umbrella/commit/bced8b9))
92
+ - **checks:** add generics to existsAndNotNull() ([bced8b9](https://github.com/thi-ng/umbrella/commit/bced8b9))
98
93
 
99
- # [2.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.2.2...@thi.ng/checks@2.3.0) (2019-08-16)
94
+ # [2.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.2.2...@thi.ng/checks@2.3.0) (2019-08-16)
100
95
 
101
- ### Bug Fixes
96
+ ### Bug Fixes
102
97
 
103
- - **checks:** better hex string, export, isNil doc ([19b1981](https://github.com/thi-ng/umbrella/commit/19b1981))
104
- - **checks:** fix vscode autoimport ([8ac6408](https://github.com/thi-ng/umbrella/commit/8ac6408))
105
- - **checks:** test, better naming ([90dce20](https://github.com/thi-ng/umbrella/commit/90dce20))
98
+ - **checks:** better hex string, export, isNil doc ([19b1981](https://github.com/thi-ng/umbrella/commit/19b1981))
99
+ - **checks:** fix vscode autoimport ([8ac6408](https://github.com/thi-ng/umbrella/commit/8ac6408))
100
+ - **checks:** test, better naming ([90dce20](https://github.com/thi-ng/umbrella/commit/90dce20))
106
101
 
107
- ### Features
102
+ ### Features
108
103
 
109
- - **checks:** isNil and isHexColorString ([ebaa15e](https://github.com/thi-ng/umbrella/commit/ebaa15e))
104
+ - **checks:** isNil and isHexColorString ([ebaa15e](https://github.com/thi-ng/umbrella/commit/ebaa15e))
110
105
 
111
- # [2.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.1.6...@thi.ng/checks@2.2.0) (2019-07-07)
106
+ # [2.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.1.6...@thi.ng/checks@2.2.0) (2019-07-07)
112
107
 
113
- ### Bug Fixes
108
+ ### Bug Fixes
114
109
 
115
- - **checks:** isMobile for Chrome iOS ([8216d48](https://github.com/thi-ng/umbrella/commit/8216d48))
110
+ - **checks:** isMobile for Chrome iOS ([8216d48](https://github.com/thi-ng/umbrella/commit/8216d48))
116
111
 
117
- ### Features
112
+ ### Features
118
113
 
119
- - **checks:** enable TS strict compiler flags (refactor) ([90515e7](https://github.com/thi-ng/umbrella/commit/90515e7))
114
+ - **checks:** enable TS strict compiler flags (refactor) ([90515e7](https://github.com/thi-ng/umbrella/commit/90515e7))
120
115
 
121
- ## [2.1.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.1.1...@thi.ng/checks@2.1.2) (2019-03-12)
116
+ ## [2.1.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.1.1...@thi.ng/checks@2.1.2) (2019-03-12)
122
117
 
123
- ### Bug Fixes
118
+ ### Bug Fixes
124
119
 
125
- - **checks:** fix [#77](https://github.com/thi-ng/umbrella/issues/77), update & minor optimization isPlainObject() ([47ac88a](https://github.com/thi-ng/umbrella/commit/47ac88a))
120
+ - **checks:** fix [#77](https://github.com/thi-ng/umbrella/issues/77), update & minor optimization isPlainObject() ([47ac88a](https://github.com/thi-ng/umbrella/commit/47ac88a))
126
121
 
127
- # [2.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.0.2...@thi.ng/checks@2.1.0) (2019-02-10)
122
+ # [2.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.0.2...@thi.ng/checks@2.1.0) (2019-02-10)
128
123
 
129
- ### Features
124
+ ### Features
130
125
 
131
- - **checks:** add isPrimitive() ([190701e](https://github.com/thi-ng/umbrella/commit/190701e))
126
+ - **checks:** add isPrimitive() ([190701e](https://github.com/thi-ng/umbrella/commit/190701e))
132
127
 
133
- # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.5.14...@thi.ng/checks@2.0.0) (2019-01-21)
128
+ # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.5.14...@thi.ng/checks@2.0.0) (2019-01-21)
134
129
 
135
- ### Build System
130
+ ### Build System
136
131
 
137
- - update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
132
+ - update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
138
133
 
139
- ### BREAKING CHANGES
134
+ ### BREAKING CHANGES
140
135
 
141
- - enabled multi-outputs (ES6 modules, CJS, UMD)
142
- - build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
143
- - all imports MUST be updated to only refer to package level (not individual files anymore). tree shaking in user land will get rid of all unused imported symbols.
136
+ - enabled multi-outputs (ES6 modules, CJS, UMD)
137
+ - build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
138
+ - all imports MUST be updated to only refer to package level (not individual files anymore). tree shaking in user land will get rid of all unused imported symbols.
144
139
 
145
- ## [1.5.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.5.3...@thi.ng/checks@1.5.4) (2018-06-18)
140
+ ## [1.5.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.5.3...@thi.ng/checks@1.5.4) (2018-06-18)
146
141
 
147
- ### Bug Fixes
142
+ ### Bug Fixes
148
143
 
149
- - **checks:** isOdd() for negative values ([3589e15](https://github.com/thi-ng/umbrella/commit/3589e15))
144
+ - **checks:** isOdd() for negative values ([3589e15](https://github.com/thi-ng/umbrella/commit/3589e15))
150
145
 
151
- ## [1.5.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.5.0...@thi.ng/checks@1.5.1) (2018-04-29)
146
+ ## [1.5.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.5.0...@thi.ng/checks@1.5.1) (2018-04-29)
152
147
 
153
- ### Bug Fixes
148
+ ### Bug Fixes
154
149
 
155
- - **checks:** exclude functions in isArrayLike() ([ac60404](https://github.com/thi-ng/umbrella/commit/ac60404))
156
- - **checks:** return type isMap() ([76920f7](https://github.com/thi-ng/umbrella/commit/76920f7))
150
+ - **checks:** exclude functions in isArrayLike() ([ac60404](https://github.com/thi-ng/umbrella/commit/ac60404))
151
+ - **checks:** return type isMap() ([76920f7](https://github.com/thi-ng/umbrella/commit/76920f7))
157
152
 
158
- # [1.5.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.4.0...@thi.ng/checks@1.5.0) (2018-04-26)
153
+ # [1.5.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.4.0...@thi.ng/checks@1.5.0) (2018-04-26)
159
154
 
160
- ### Features
155
+ ### Features
161
156
 
162
- - **checks:** add date, map, nan, set checks ([a865f62](https://github.com/thi-ng/umbrella/commit/a865f62))
157
+ - **checks:** add date, map, nan, set checks ([a865f62](https://github.com/thi-ng/umbrella/commit/a865f62))
163
158
 
164
- # [1.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.3.2...@thi.ng/checks@1.4.0) (2018-04-08)
159
+ # [1.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.3.2...@thi.ng/checks@1.4.0) (2018-04-08)
165
160
 
166
- ### Features
161
+ ### Features
167
162
 
168
- - **checks:** add hasPerformance() check (performance.now) ([40d706b](https://github.com/thi-ng/umbrella/commit/40d706b))
163
+ - **checks:** add hasPerformance() check (performance.now) ([40d706b](https://github.com/thi-ng/umbrella/commit/40d706b))
169
164
 
170
- ## [1.3.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.3.1...@thi.ng/checks@1.3.2) (2018-04-04)
165
+ ## [1.3.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.3.1...@thi.ng/checks@1.3.2) (2018-04-04)
171
166
 
172
- ### Bug Fixes
167
+ ### Bug Fixes
173
168
 
174
- - **checks:** add prototype check for isPlainObject(), add tests ([bffc443](https://github.com/thi-ng/umbrella/commit/bffc443))
169
+ - **checks:** add prototype check for isPlainObject(), add tests ([bffc443](https://github.com/thi-ng/umbrella/commit/bffc443))
175
170
 
176
- # [1.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.2.1...@thi.ng/checks@1.3.0) (2018-03-08)
171
+ # [1.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.2.1...@thi.ng/checks@1.3.0) (2018-03-08)
177
172
 
178
- ### Features
173
+ ### Features
179
174
 
180
- - **checks:** add isPromise() & isPromiseLike() ([9900e99](https://github.com/thi-ng/umbrella/commit/9900e99))
175
+ - **checks:** add isPromise() & isPromiseLike() ([9900e99](https://github.com/thi-ng/umbrella/commit/9900e99))
181
176
 
182
- # [1.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.1.6...@thi.ng/checks@1.2.0) (2018-02-08)
177
+ # [1.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.1.6...@thi.ng/checks@1.2.0) (2018-02-08)
183
178
 
184
- ### Features
179
+ ### Features
185
180
 
186
181
  - **checks:** add new predicates, refactor existing ([68f8fc2](https://github.com/thi-ng/umbrella/commit/68f8fc2))
package/README.md CHANGED
@@ -52,7 +52,7 @@ node --experimental-repl-await
52
52
  > const checks = await import("@thi.ng/checks");
53
53
  ```
54
54
 
55
- Package sizes (gzipped, pre-treeshake): ESM: 1.63 KB
55
+ Package sizes (gzipped, pre-treeshake): ESM: 1.72 KB
56
56
 
57
57
  ## Dependencies
58
58
 
package/is-primitive.d.ts CHANGED
@@ -1,2 +1,7 @@
1
- export declare const isPrimitive: (x: any) => x is string | number;
1
+ /**
2
+ * Returns true if `x` is a string, number or boolean.
3
+ *
4
+ * @param x
5
+ */
6
+ export declare const isPrimitive: (x: any) => x is string | number | boolean;
2
7
  //# sourceMappingURL=is-primitive.d.ts.map
package/is-primitive.js CHANGED
@@ -1,4 +1,9 @@
1
+ /**
2
+ * Returns true if `x` is a string, number or boolean.
3
+ *
4
+ * @param x
5
+ */
1
6
  export const isPrimitive = (x) => {
2
7
  const t = typeof x;
3
- return t === "string" || t === "number";
8
+ return t === "string" || t === "number" || t === "boolean";
4
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/checks",
3
- "version": "3.0.2",
3
+ "version": "3.0.7",
4
4
  "description": "Collection of 50+ type, feature & value checks",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -37,7 +37,7 @@
37
37
  "tslib": "^2.3.1"
38
38
  },
39
39
  "devDependencies": {
40
- "@thi.ng/testament": "^0.1.2"
40
+ "@thi.ng/testament": "^0.1.6"
41
41
  },
42
42
  "keywords": [
43
43
  "detect",
@@ -260,5 +260,5 @@
260
260
  "import": "./is-zero.js"
261
261
  }
262
262
  },
263
- "gitHead": "3c5f903104da150588946a94bb118ad559ad395d"
263
+ "gitHead": "5fe52419af63984ebe53032201b2a6174b9cb159"
264
264
  }