@thi.ng/checks
Advanced tools
Comparing version 3.0.6 to 3.0.7
185
CHANGELOG.md
@@ -6,50 +6,13 @@ # Change Log | ||
## [3.0.6](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@3.0.5...@thi.ng/checks@3.0.6) (2021-10-28) | ||
## [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) | ||
**Note:** Version bump only for package @thi.ng/checks | ||
### Bug Fixes | ||
* **checks:** add boolean to isPrimitive() ([fde4d2b](https://github.com/thi-ng/umbrella/commit/fde4d2b6aab02887e12f14c75fccf37b686844ae)) | ||
## [3.0.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@3.0.4...@thi.ng/checks@3.0.5) (2021-10-28) | ||
**Note:** Version bump only for package @thi.ng/checks | ||
## [3.0.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@3.0.3...@thi.ng/checks@3.0.4) (2021-10-25) | ||
**Note:** Version bump only for package @thi.ng/checks | ||
## [3.0.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@3.0.2...@thi.ng/checks@3.0.3) (2021-10-15) | ||
**Note:** Version bump only for package @thi.ng/checks | ||
## [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) | ||
**Note:** Version bump only for package @thi.ng/checks | ||
## [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) | ||
**Note:** Version bump only for package @thi.ng/checks | ||
# [3.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.9.11...@thi.ng/checks@3.0.0) (2021-10-12) | ||
@@ -84,137 +47,137 @@ | ||
# [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) | ||
# [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) | ||
### Features | ||
### Features | ||
- **checks:** add isIllegalKey() (make public) ([507fc80](https://github.com/thi-ng/umbrella/commit/507fc806903e766e42a98ddd569ba4031925204b)) | ||
- **checks:** replace isPrototypePolluted() w/ isProtoPath() ([d276b84](https://github.com/thi-ng/umbrella/commit/d276b8465eda21a32f3613d20c043ea50fce7f57)) | ||
- **checks:** add isIllegalKey() (make public) ([507fc80](https://github.com/thi-ng/umbrella/commit/507fc806903e766e42a98ddd569ba4031925204b)) | ||
- **checks:** replace isPrototypePolluted() w/ isProtoPath() ([d276b84](https://github.com/thi-ng/umbrella/commit/d276b8465eda21a32f3613d20c043ea50fce7f57)) | ||
# [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) | ||
# [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) | ||
### Features | ||
### Features | ||
- **checks:** add isNumericInt/Float() checks ([7e054c1](https://github.com/thi-ng/umbrella/commit/7e054c14b06850800869ba0bc8c8174e233dda53)) | ||
- **checks:** add isNumericInt/Float() checks ([7e054c1](https://github.com/thi-ng/umbrella/commit/7e054c14b06850800869ba0bc8c8174e233dda53)) | ||
## [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) | ||
## [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) | ||
### Bug Fixes | ||
### Bug Fixes | ||
- **checks:** update isPlainObject() type assertion ([e5ceb7d](https://github.com/thi-ng/umbrella/commit/e5ceb7d3e1ef5be7a4e83319ab1c36bbc3e1b1a8)) | ||
- **checks:** update isPlainObject() type assertion ([e5ceb7d](https://github.com/thi-ng/umbrella/commit/e5ceb7d3e1ef5be7a4e83319ab1c36bbc3e1b1a8)) | ||
# [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) | ||
# [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) | ||
### Features | ||
### Features | ||
- **checks:** add isAsyncIterable() ([59ac3a9](https://github.com/thi-ng/umbrella/commit/59ac3a9ea2588bf8afc0a8e9bfed72ffb875c47d)) | ||
- **checks:** add isAsyncIterable() ([59ac3a9](https://github.com/thi-ng/umbrella/commit/59ac3a9ea2588bf8afc0a8e9bfed72ffb875c47d)) | ||
# [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) | ||
# [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) | ||
### Bug Fixes | ||
### Bug Fixes | ||
- **checks:** typo ([4e4a6e1](https://github.com/thi-ng/umbrella/commit/4e4a6e1062075705d96883f860f23b545fd9ebdf)) | ||
- **checks:** typo ([4e4a6e1](https://github.com/thi-ng/umbrella/commit/4e4a6e1062075705d96883f860f23b545fd9ebdf)) | ||
### Features | ||
### Features | ||
- **checks:** add better type assertion for isTypedArray() ([548ba52](https://github.com/thi-ng/umbrella/commit/548ba5205033bcc4a917fa56ede65ba3df4b3eef)) | ||
- **checks:** add new string validators ([9d9e8a8](https://github.com/thi-ng/umbrella/commit/9d9e8a8bcb73efb728faf4a216a9dfcac31a0639)) | ||
- **checks:** add better type assertion for isTypedArray() ([548ba52](https://github.com/thi-ng/umbrella/commit/548ba5205033bcc4a917fa56ede65ba3df4b3eef)) | ||
- **checks:** add new string validators ([9d9e8a8](https://github.com/thi-ng/umbrella/commit/9d9e8a8bcb73efb728faf4a216a9dfcac31a0639)) | ||
# [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) | ||
# [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) | ||
### Features | ||
### Features | ||
- **checks:** add hasBigInt() ([aa4faed](https://github.com/thi-ng/umbrella/commit/aa4faed08362caa591f64d1ffce75e8d9e213dd9)) | ||
- **checks:** add hasBigInt() ([aa4faed](https://github.com/thi-ng/umbrella/commit/aa4faed08362caa591f64d1ffce75e8d9e213dd9)) | ||
# [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) | ||
# [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) | ||
### Features | ||
### Features | ||
- **checks:** add generics to existsAndNotNull() ([bced8b9](https://github.com/thi-ng/umbrella/commit/bced8b9)) | ||
- **checks:** add generics to existsAndNotNull() ([bced8b9](https://github.com/thi-ng/umbrella/commit/bced8b9)) | ||
# [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) | ||
# [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) | ||
### Bug Fixes | ||
### Bug Fixes | ||
- **checks:** better hex string, export, isNil doc ([19b1981](https://github.com/thi-ng/umbrella/commit/19b1981)) | ||
- **checks:** fix vscode autoimport ([8ac6408](https://github.com/thi-ng/umbrella/commit/8ac6408)) | ||
- **checks:** test, better naming ([90dce20](https://github.com/thi-ng/umbrella/commit/90dce20)) | ||
- **checks:** better hex string, export, isNil doc ([19b1981](https://github.com/thi-ng/umbrella/commit/19b1981)) | ||
- **checks:** fix vscode autoimport ([8ac6408](https://github.com/thi-ng/umbrella/commit/8ac6408)) | ||
- **checks:** test, better naming ([90dce20](https://github.com/thi-ng/umbrella/commit/90dce20)) | ||
### Features | ||
### Features | ||
- **checks:** isNil and isHexColorString ([ebaa15e](https://github.com/thi-ng/umbrella/commit/ebaa15e)) | ||
- **checks:** isNil and isHexColorString ([ebaa15e](https://github.com/thi-ng/umbrella/commit/ebaa15e)) | ||
# [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) | ||
# [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) | ||
### Bug Fixes | ||
### Bug Fixes | ||
- **checks:** isMobile for Chrome iOS ([8216d48](https://github.com/thi-ng/umbrella/commit/8216d48)) | ||
- **checks:** isMobile for Chrome iOS ([8216d48](https://github.com/thi-ng/umbrella/commit/8216d48)) | ||
### Features | ||
### Features | ||
- **checks:** enable TS strict compiler flags (refactor) ([90515e7](https://github.com/thi-ng/umbrella/commit/90515e7)) | ||
- **checks:** enable TS strict compiler flags (refactor) ([90515e7](https://github.com/thi-ng/umbrella/commit/90515e7)) | ||
## [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) | ||
## [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) | ||
### Bug Fixes | ||
### Bug Fixes | ||
- **checks:** fix [#77](https://github.com/thi-ng/umbrella/issues/77), update & minor optimization isPlainObject() ([47ac88a](https://github.com/thi-ng/umbrella/commit/47ac88a)) | ||
- **checks:** fix [#77](https://github.com/thi-ng/umbrella/issues/77), update & minor optimization isPlainObject() ([47ac88a](https://github.com/thi-ng/umbrella/commit/47ac88a)) | ||
# [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) | ||
# [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) | ||
### Features | ||
### Features | ||
- **checks:** add isPrimitive() ([190701e](https://github.com/thi-ng/umbrella/commit/190701e)) | ||
- **checks:** add isPrimitive() ([190701e](https://github.com/thi-ng/umbrella/commit/190701e)) | ||
# [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) | ||
# [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) | ||
### Build System | ||
### Build System | ||
- update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703)) | ||
- update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703)) | ||
### BREAKING CHANGES | ||
### BREAKING CHANGES | ||
- enabled multi-outputs (ES6 modules, CJS, UMD) | ||
- build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib` | ||
- 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. | ||
- enabled multi-outputs (ES6 modules, CJS, UMD) | ||
- build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib` | ||
- 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. | ||
## [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) | ||
## [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) | ||
### Bug Fixes | ||
### Bug Fixes | ||
- **checks:** isOdd() for negative values ([3589e15](https://github.com/thi-ng/umbrella/commit/3589e15)) | ||
- **checks:** isOdd() for negative values ([3589e15](https://github.com/thi-ng/umbrella/commit/3589e15)) | ||
## [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) | ||
## [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) | ||
### Bug Fixes | ||
### Bug Fixes | ||
- **checks:** exclude functions in isArrayLike() ([ac60404](https://github.com/thi-ng/umbrella/commit/ac60404)) | ||
- **checks:** return type isMap() ([76920f7](https://github.com/thi-ng/umbrella/commit/76920f7)) | ||
- **checks:** exclude functions in isArrayLike() ([ac60404](https://github.com/thi-ng/umbrella/commit/ac60404)) | ||
- **checks:** return type isMap() ([76920f7](https://github.com/thi-ng/umbrella/commit/76920f7)) | ||
# [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) | ||
# [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) | ||
### Features | ||
### Features | ||
- **checks:** add date, map, nan, set checks ([a865f62](https://github.com/thi-ng/umbrella/commit/a865f62)) | ||
- **checks:** add date, map, nan, set checks ([a865f62](https://github.com/thi-ng/umbrella/commit/a865f62)) | ||
# [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) | ||
# [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) | ||
### Features | ||
### Features | ||
- **checks:** add hasPerformance() check (performance.now) ([40d706b](https://github.com/thi-ng/umbrella/commit/40d706b)) | ||
- **checks:** add hasPerformance() check (performance.now) ([40d706b](https://github.com/thi-ng/umbrella/commit/40d706b)) | ||
## [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) | ||
## [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) | ||
### Bug Fixes | ||
### Bug Fixes | ||
- **checks:** add prototype check for isPlainObject(), add tests ([bffc443](https://github.com/thi-ng/umbrella/commit/bffc443)) | ||
- **checks:** add prototype check for isPlainObject(), add tests ([bffc443](https://github.com/thi-ng/umbrella/commit/bffc443)) | ||
# [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) | ||
# [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) | ||
### Features | ||
### Features | ||
- **checks:** add isPromise() & isPromiseLike() ([9900e99](https://github.com/thi-ng/umbrella/commit/9900e99)) | ||
- **checks:** add isPromise() & isPromiseLike() ([9900e99](https://github.com/thi-ng/umbrella/commit/9900e99)) | ||
# [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) | ||
# [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) | ||
### Features | ||
### Features | ||
- **checks:** add new predicates, refactor existing ([68f8fc2](https://github.com/thi-ng/umbrella/commit/68f8fc2)) |
@@ -1,2 +0,7 @@ | ||
export declare const isPrimitive: (x: any) => x is string | number; | ||
/** | ||
* Returns true if `x` is a string, number or boolean. | ||
* | ||
* @param x | ||
*/ | ||
export declare const isPrimitive: (x: any) => x is string | number | boolean; | ||
//# sourceMappingURL=is-primitive.d.ts.map |
@@ -0,4 +1,9 @@ | ||
/** | ||
* Returns true if `x` is a string, number or boolean. | ||
* | ||
* @param x | ||
*/ | ||
export const isPrimitive = (x) => { | ||
const t = typeof x; | ||
return t === "string" || t === "number"; | ||
return t === "string" || t === "number" || t === "boolean"; | ||
}; |
{ | ||
"name": "@thi.ng/checks", | ||
"version": "3.0.6", | ||
"version": "3.0.7", | ||
"description": "Collection of 50+ type, feature & value checks", | ||
@@ -263,3 +263,3 @@ "type": "module", | ||
}, | ||
"gitHead": "c17a556ad25f6882dfa8f806a1d9e8ed7ac7cd71" | ||
"gitHead": "5fe52419af63984ebe53032201b2a6174b9cb159" | ||
} |
@@ -55,3 +55,3 @@ <!-- This file is generated - DO NOT EDIT! --> | ||
Package sizes (gzipped, pre-treeshake): ESM: 1.63 KB | ||
Package sizes (gzipped, pre-treeshake): ESM: 1.72 KB | ||
@@ -58,0 +58,0 @@ ## Dependencies |
450
48515