@thi.ng/checks
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -6,2 +6,10 @@ # Change Log | ||
## [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) | ||
@@ -8,0 +16,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { isFunction } from "./is-function"; | ||
import { isFunction } from "./is-function.js"; | ||
export const hasPerformance = () => typeof performance !== "undefined" && isFunction(performance.now); |
130
index.d.ts
@@ -1,66 +0,66 @@ | ||
export * from "./exists-not-null"; | ||
export * from "./exists"; | ||
export * from "./has-bigint"; | ||
export * from "./has-crypto"; | ||
export * from "./has-max-length"; | ||
export * from "./has-min-length"; | ||
export * from "./has-performance"; | ||
export * from "./has-wasm"; | ||
export * from "./has-webgl"; | ||
export * from "./has-websocket"; | ||
export * from "./implements-function"; | ||
export * from "./is-alphanum"; | ||
export * from "./is-array"; | ||
export * from "./is-arraylike"; | ||
export * from "./is-ascii"; | ||
export * from "./is-async-iterable"; | ||
export * from "./is-blob"; | ||
export * from "./is-boolean"; | ||
export * from "./is-chrome"; | ||
export * from "./is-data-url"; | ||
export * from "./is-date"; | ||
export * from "./is-even"; | ||
export * from "./is-false"; | ||
export * from "./is-file"; | ||
export * from "./is-firefox"; | ||
export * from "./is-float-string"; | ||
export * from "./is-function"; | ||
export * from "./is-hex"; | ||
export * from "./is-hex-color"; | ||
export * from "./is-ie"; | ||
export * from "./is-in-range"; | ||
export * from "./is-int32"; | ||
export * from "./is-int-string"; | ||
export * from "./is-iterable"; | ||
export * from "./is-map"; | ||
export * from "./is-mobile"; | ||
export * from "./is-nan"; | ||
export * from "./is-negative"; | ||
export * from "./is-nil"; | ||
export * from "./is-node"; | ||
export * from "./is-not-string-iterable"; | ||
export * from "./is-null"; | ||
export * from "./is-number"; | ||
export * from "./is-numeric"; | ||
export * from "./is-object"; | ||
export * from "./is-odd"; | ||
export * from "./is-plain-object"; | ||
export * from "./is-positive"; | ||
export * from "./is-primitive"; | ||
export * from "./is-promise"; | ||
export * from "./is-promiselike"; | ||
export * from "./is-proto-path"; | ||
export * from "./is-regexp"; | ||
export * from "./is-safari"; | ||
export * from "./is-set"; | ||
export * from "./is-string"; | ||
export * from "./is-symbol"; | ||
export * from "./is-transferable"; | ||
export * from "./is-true"; | ||
export * from "./is-typedarray"; | ||
export * from "./is-uint32"; | ||
export * from "./is-undefined"; | ||
export * from "./is-uuid"; | ||
export * from "./is-uuid4"; | ||
export * from "./is-zero"; | ||
export * from "./exists-not-null.js"; | ||
export * from "./exists.js"; | ||
export * from "./has-bigint.js"; | ||
export * from "./has-crypto.js"; | ||
export * from "./has-max-length.js"; | ||
export * from "./has-min-length.js"; | ||
export * from "./has-performance.js"; | ||
export * from "./has-wasm.js"; | ||
export * from "./has-webgl.js"; | ||
export * from "./has-websocket.js"; | ||
export * from "./implements-function.js"; | ||
export * from "./is-alphanum.js"; | ||
export * from "./is-array.js"; | ||
export * from "./is-arraylike.js"; | ||
export * from "./is-ascii.js"; | ||
export * from "./is-async-iterable.js"; | ||
export * from "./is-blob.js"; | ||
export * from "./is-boolean.js"; | ||
export * from "./is-chrome.js"; | ||
export * from "./is-data-url.js"; | ||
export * from "./is-date.js"; | ||
export * from "./is-even.js"; | ||
export * from "./is-false.js"; | ||
export * from "./is-file.js"; | ||
export * from "./is-firefox.js"; | ||
export * from "./is-float-string.js"; | ||
export * from "./is-function.js"; | ||
export * from "./is-hex.js"; | ||
export * from "./is-hex-color.js"; | ||
export * from "./is-ie.js"; | ||
export * from "./is-in-range.js"; | ||
export * from "./is-int32.js"; | ||
export * from "./is-int-string.js"; | ||
export * from "./is-iterable.js"; | ||
export * from "./is-map.js"; | ||
export * from "./is-mobile.js"; | ||
export * from "./is-nan.js"; | ||
export * from "./is-negative.js"; | ||
export * from "./is-nil.js"; | ||
export * from "./is-node.js"; | ||
export * from "./is-not-string-iterable.js"; | ||
export * from "./is-null.js"; | ||
export * from "./is-number.js"; | ||
export * from "./is-numeric.js"; | ||
export * from "./is-object.js"; | ||
export * from "./is-odd.js"; | ||
export * from "./is-plain-object.js"; | ||
export * from "./is-positive.js"; | ||
export * from "./is-primitive.js"; | ||
export * from "./is-promise.js"; | ||
export * from "./is-promiselike.js"; | ||
export * from "./is-proto-path.js"; | ||
export * from "./is-regexp.js"; | ||
export * from "./is-safari.js"; | ||
export * from "./is-set.js"; | ||
export * from "./is-string.js"; | ||
export * from "./is-symbol.js"; | ||
export * from "./is-transferable.js"; | ||
export * from "./is-true.js"; | ||
export * from "./is-typedarray.js"; | ||
export * from "./is-uint32.js"; | ||
export * from "./is-undefined.js"; | ||
export * from "./is-uuid.js"; | ||
export * from "./is-uuid4.js"; | ||
export * from "./is-zero.js"; | ||
//# sourceMappingURL=index.d.ts.map |
130
index.js
@@ -1,65 +0,65 @@ | ||
export * from "./exists-not-null"; | ||
export * from "./exists"; | ||
export * from "./has-bigint"; | ||
export * from "./has-crypto"; | ||
export * from "./has-max-length"; | ||
export * from "./has-min-length"; | ||
export * from "./has-performance"; | ||
export * from "./has-wasm"; | ||
export * from "./has-webgl"; | ||
export * from "./has-websocket"; | ||
export * from "./implements-function"; | ||
export * from "./is-alphanum"; | ||
export * from "./is-array"; | ||
export * from "./is-arraylike"; | ||
export * from "./is-ascii"; | ||
export * from "./is-async-iterable"; | ||
export * from "./is-blob"; | ||
export * from "./is-boolean"; | ||
export * from "./is-chrome"; | ||
export * from "./is-data-url"; | ||
export * from "./is-date"; | ||
export * from "./is-even"; | ||
export * from "./is-false"; | ||
export * from "./is-file"; | ||
export * from "./is-firefox"; | ||
export * from "./is-float-string"; | ||
export * from "./is-function"; | ||
export * from "./is-hex"; | ||
export * from "./is-hex-color"; | ||
export * from "./is-ie"; | ||
export * from "./is-in-range"; | ||
export * from "./is-int32"; | ||
export * from "./is-int-string"; | ||
export * from "./is-iterable"; | ||
export * from "./is-map"; | ||
export * from "./is-mobile"; | ||
export * from "./is-nan"; | ||
export * from "./is-negative"; | ||
export * from "./is-nil"; | ||
export * from "./is-node"; | ||
export * from "./is-not-string-iterable"; | ||
export * from "./is-null"; | ||
export * from "./is-number"; | ||
export * from "./is-numeric"; | ||
export * from "./is-object"; | ||
export * from "./is-odd"; | ||
export * from "./is-plain-object"; | ||
export * from "./is-positive"; | ||
export * from "./is-primitive"; | ||
export * from "./is-promise"; | ||
export * from "./is-promiselike"; | ||
export * from "./is-proto-path"; | ||
export * from "./is-regexp"; | ||
export * from "./is-safari"; | ||
export * from "./is-set"; | ||
export * from "./is-string"; | ||
export * from "./is-symbol"; | ||
export * from "./is-transferable"; | ||
export * from "./is-true"; | ||
export * from "./is-typedarray"; | ||
export * from "./is-uint32"; | ||
export * from "./is-undefined"; | ||
export * from "./is-uuid"; | ||
export * from "./is-uuid4"; | ||
export * from "./is-zero"; | ||
export * from "./exists-not-null.js"; | ||
export * from "./exists.js"; | ||
export * from "./has-bigint.js"; | ||
export * from "./has-crypto.js"; | ||
export * from "./has-max-length.js"; | ||
export * from "./has-min-length.js"; | ||
export * from "./has-performance.js"; | ||
export * from "./has-wasm.js"; | ||
export * from "./has-webgl.js"; | ||
export * from "./has-websocket.js"; | ||
export * from "./implements-function.js"; | ||
export * from "./is-alphanum.js"; | ||
export * from "./is-array.js"; | ||
export * from "./is-arraylike.js"; | ||
export * from "./is-ascii.js"; | ||
export * from "./is-async-iterable.js"; | ||
export * from "./is-blob.js"; | ||
export * from "./is-boolean.js"; | ||
export * from "./is-chrome.js"; | ||
export * from "./is-data-url.js"; | ||
export * from "./is-date.js"; | ||
export * from "./is-even.js"; | ||
export * from "./is-false.js"; | ||
export * from "./is-file.js"; | ||
export * from "./is-firefox.js"; | ||
export * from "./is-float-string.js"; | ||
export * from "./is-function.js"; | ||
export * from "./is-hex.js"; | ||
export * from "./is-hex-color.js"; | ||
export * from "./is-ie.js"; | ||
export * from "./is-in-range.js"; | ||
export * from "./is-int32.js"; | ||
export * from "./is-int-string.js"; | ||
export * from "./is-iterable.js"; | ||
export * from "./is-map.js"; | ||
export * from "./is-mobile.js"; | ||
export * from "./is-nan.js"; | ||
export * from "./is-negative.js"; | ||
export * from "./is-nil.js"; | ||
export * from "./is-node.js"; | ||
export * from "./is-not-string-iterable.js"; | ||
export * from "./is-null.js"; | ||
export * from "./is-number.js"; | ||
export * from "./is-numeric.js"; | ||
export * from "./is-object.js"; | ||
export * from "./is-odd.js"; | ||
export * from "./is-plain-object.js"; | ||
export * from "./is-positive.js"; | ||
export * from "./is-primitive.js"; | ||
export * from "./is-promise.js"; | ||
export * from "./is-promiselike.js"; | ||
export * from "./is-proto-path.js"; | ||
export * from "./is-regexp.js"; | ||
export * from "./is-safari.js"; | ||
export * from "./is-set.js"; | ||
export * from "./is-string.js"; | ||
export * from "./is-symbol.js"; | ||
export * from "./is-transferable.js"; | ||
export * from "./is-true.js"; | ||
export * from "./is-typedarray.js"; | ||
export * from "./is-uint32.js"; | ||
export * from "./is-undefined.js"; | ||
export * from "./is-uuid.js"; | ||
export * from "./is-uuid4.js"; | ||
export * from "./is-zero.js"; |
@@ -1,3 +0,3 @@ | ||
import { isString } from "./is-string"; | ||
import { isString } from "./is-string.js"; | ||
const RE = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i; | ||
export const isHexColor = (x) => isString(x) && RE.test(x); |
@@ -1,3 +0,3 @@ | ||
import { implementsFunction } from "./implements-function"; | ||
import { implementsFunction } from "./implements-function.js"; | ||
export const isPromiseLike = (x) => x instanceof Promise || | ||
(implementsFunction(x, "then") && implementsFunction(x, "catch")); |
@@ -1,3 +0,3 @@ | ||
import { isArray } from "./is-array"; | ||
import { isString } from "./is-string"; | ||
import { isArray } from "./is-array.js"; | ||
import { isString } from "./is-string.js"; | ||
const ILLEGAL_KEYS = new Set(["__proto__", "prototype", "constructor"]); | ||
@@ -4,0 +4,0 @@ /** |
@@ -1,4 +0,4 @@ | ||
import { isChrome } from "./is-chrome"; | ||
import { isChrome } from "./is-chrome.js"; | ||
export const isSafari = () => typeof navigator !== "undefined" && | ||
/Safari/.test(navigator.userAgent) && | ||
!isChrome(); |
{ | ||
"name": "@thi.ng/checks", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Collection of 50+ type, feature & value checks", | ||
@@ -40,3 +40,3 @@ "type": "module", | ||
"devDependencies": { | ||
"@thi.ng/testament": "^0.1.0" | ||
"@thi.ng/testament": "^0.1.1" | ||
}, | ||
@@ -57,2 +57,5 @@ "keywords": [ | ||
}, | ||
"engines": { | ||
"node": ">=12.7" | ||
}, | ||
"files": [ | ||
@@ -262,3 +265,3 @@ "*.js", | ||
}, | ||
"gitHead": "9ac1344b38b565eb894306fbf72233b6c0b2d115" | ||
"gitHead": "2e6b3d7c0f4c5686c1e9bdb4902ed7d3f90bcc19" | ||
} |
@@ -46,6 +46,7 @@ <!-- This file is generated - DO NOT EDIT! --> | ||
For NodeJS (v14.6+): | ||
For Node.js REPL: | ||
```text | ||
node --experimental-specifier-resolution=node --experimental-repl-await | ||
# with flag only for < v16 | ||
node --experimental-repl-await | ||
@@ -52,0 +53,0 @@ > const checks = await import("@thi.ng/checks"); |
48301
92