@thi.ng/checks 3.4.10 → 3.4.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.
Files changed (70) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/exists-not-null.js +4 -1
  3. package/exists.js +4 -1
  4. package/has-bigint.js +4 -1
  5. package/has-crypto.js +4 -1
  6. package/has-max-length.js +4 -1
  7. package/has-min-length.js +4 -1
  8. package/has-performance.js +4 -1
  9. package/has-wasm.js +4 -4
  10. package/has-webgl.js +10 -8
  11. package/has-websocket.js +4 -1
  12. package/implements-function.js +4 -1
  13. package/is-alphanum.js +8 -3
  14. package/is-array.js +4 -1
  15. package/is-arraylike.js +4 -1
  16. package/is-ascii.js +6 -12
  17. package/is-async-iterable.js +4 -1
  18. package/is-bigint.js +4 -1
  19. package/is-blob.js +4 -1
  20. package/is-boolean.js +4 -1
  21. package/is-chrome.js +4 -1
  22. package/is-data-url.js +4 -1
  23. package/is-date.js +4 -1
  24. package/is-even.js +4 -1
  25. package/is-false.js +4 -1
  26. package/is-file.js +4 -1
  27. package/is-firefox.js +4 -1
  28. package/is-float-string.js +4 -1
  29. package/is-function.js +4 -1
  30. package/is-generator.js +4 -7
  31. package/is-hex-color.js +4 -1
  32. package/is-hex.js +4 -1
  33. package/is-ie.js +4 -3
  34. package/is-in-range.js +4 -1
  35. package/is-int-string.js +4 -1
  36. package/is-int32.js +4 -1
  37. package/is-iterable.js +4 -1
  38. package/is-map.js +4 -1
  39. package/is-mobile.js +6 -2
  40. package/is-nan.js +4 -1
  41. package/is-negative.js +4 -1
  42. package/is-nil.js +4 -5
  43. package/is-node.js +4 -3
  44. package/is-not-string-iterable.js +4 -3
  45. package/is-null.js +4 -1
  46. package/is-number.js +4 -1
  47. package/is-numeric.js +6 -14
  48. package/is-object.js +4 -1
  49. package/is-odd.js +4 -1
  50. package/is-plain-object.js +6 -11
  51. package/is-positive.js +4 -1
  52. package/is-primitive.js +6 -8
  53. package/is-promise.js +4 -1
  54. package/is-promiselike.js +4 -2
  55. package/is-proto-path.js +7 -31
  56. package/is-regexp.js +4 -1
  57. package/is-safari.js +4 -3
  58. package/is-set.js +4 -1
  59. package/is-string.js +4 -1
  60. package/is-symbol.js +4 -1
  61. package/is-touch-event.js +4 -8
  62. package/is-transferable.js +4 -4
  63. package/is-true.js +4 -1
  64. package/is-typedarray.js +4 -10
  65. package/is-uint32.js +4 -1
  66. package/is-undefined.js +4 -1
  67. package/is-uuid.js +4 -1
  68. package/is-uuid4.js +4 -1
  69. package/is-zero.js +4 -1
  70. package/package.json +6 -4
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2023-12-03T12:13:31Z
3
+ - **Last updated**: 2023-12-11T10:07:09Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -1 +1,4 @@
1
- export const existsAndNotNull = (x) => x != null;
1
+ const existsAndNotNull = (x) => x != null;
2
+ export {
3
+ existsAndNotNull
4
+ };
package/exists.js CHANGED
@@ -1 +1,4 @@
1
- export const exists = (t) => t !== undefined;
1
+ const exists = (t) => t !== void 0;
2
+ export {
3
+ exists
4
+ };
package/has-bigint.js CHANGED
@@ -1 +1,4 @@
1
- export const hasBigInt = () => typeof BigInt === "function";
1
+ const hasBigInt = () => typeof BigInt === "function";
2
+ export {
3
+ hasBigInt
4
+ };
package/has-crypto.js CHANGED
@@ -1 +1,4 @@
1
- export const hasCrypto = () => typeof window !== "undefined" && window["crypto"] !== undefined;
1
+ const hasCrypto = () => typeof window !== "undefined" && window["crypto"] !== void 0;
2
+ export {
3
+ hasCrypto
4
+ };
package/has-max-length.js CHANGED
@@ -1 +1,4 @@
1
- export const hasMaxLength = (len, x) => x != null && x.length <= len;
1
+ const hasMaxLength = (len, x) => x != null && x.length <= len;
2
+ export {
3
+ hasMaxLength
4
+ };
package/has-min-length.js CHANGED
@@ -1 +1,4 @@
1
- export const hasMinLength = (len, x) => x != null && x.length >= len;
1
+ const hasMinLength = (len, x) => x != null && x.length >= len;
2
+ export {
3
+ hasMinLength
4
+ };
@@ -1,2 +1,5 @@
1
1
  import { isFunction } from "./is-function.js";
2
- export const hasPerformance = () => typeof performance !== "undefined" && isFunction(performance.now);
2
+ const hasPerformance = () => typeof performance !== "undefined" && isFunction(performance.now);
3
+ export {
4
+ hasPerformance
5
+ };
package/has-wasm.js CHANGED
@@ -1,4 +1,4 @@
1
- export const hasWASM = () => (typeof window !== "undefined" &&
2
- typeof window["WebAssembly"] !== "undefined") ||
3
- (typeof global !== "undefined" &&
4
- typeof global["WebAssembly"] !== "undefined");
1
+ const hasWASM = () => typeof window !== "undefined" && typeof window["WebAssembly"] !== "undefined" || typeof global !== "undefined" && typeof global["WebAssembly"] !== "undefined";
2
+ export {
3
+ hasWASM
4
+ };
package/has-webgl.js CHANGED
@@ -1,9 +1,11 @@
1
- export const hasWebGL = () => {
2
- try {
3
- document.createElement("canvas").getContext("webgl");
4
- return true;
5
- }
6
- catch (e) {
7
- return false;
8
- }
1
+ const hasWebGL = () => {
2
+ try {
3
+ document.createElement("canvas").getContext("webgl");
4
+ return true;
5
+ } catch (e) {
6
+ return false;
7
+ }
8
+ };
9
+ export {
10
+ hasWebGL
9
11
  };
package/has-websocket.js CHANGED
@@ -1 +1,4 @@
1
- export const hasWebSocket = () => typeof WebSocket !== "undefined";
1
+ const hasWebSocket = () => typeof WebSocket !== "undefined";
2
+ export {
3
+ hasWebSocket
4
+ };
@@ -1 +1,4 @@
1
- export const implementsFunction = (x, fn) => x != null && typeof x[fn] === "function";
1
+ const implementsFunction = (x, fn) => x != null && typeof x[fn] === "function";
2
+ export {
3
+ implementsFunction
4
+ };
package/is-alphanum.js CHANGED
@@ -1,3 +1,8 @@
1
- export const isAlpha = (x) => /^[a-z]+$/i.test(x);
2
- export const isAlphaNum = (x) => /^[a-z0-9]+$/i.test(x);
3
- export const isNumeric = (x) => /^[0-9]+$/.test(x);
1
+ const isAlpha = (x) => /^[a-z]+$/i.test(x);
2
+ const isAlphaNum = (x) => /^[a-z0-9]+$/i.test(x);
3
+ const isNumeric = (x) => /^[0-9]+$/.test(x);
4
+ export {
5
+ isAlpha,
6
+ isAlphaNum,
7
+ isNumeric
8
+ };
package/is-array.js CHANGED
@@ -1 +1,4 @@
1
- export const isArray = Array.isArray;
1
+ const isArray = Array.isArray;
2
+ export {
3
+ isArray
4
+ };
package/is-arraylike.js CHANGED
@@ -1 +1,4 @@
1
- export const isArrayLike = (x) => x != null && typeof x !== "function" && x.length !== undefined;
1
+ const isArrayLike = (x) => x != null && typeof x !== "function" && x.length !== void 0;
2
+ export {
3
+ isArrayLike
4
+ };
package/is-ascii.js CHANGED
@@ -1,12 +1,6 @@
1
- /**
2
- * Returns true iff all chars are in ASCII range [0x00 .. 0x7f]
3
- *
4
- * @param x -
5
- */
6
- export const isASCII = (x) => /^[\x00-\x7f]+$/.test(x);
7
- /**
8
- * Returns true iff all chars are in printable ASCII range [0x20 .. 0x7e]
9
- *
10
- * @param x -
11
- */
12
- export const isPrintableASCII = (x) => /^[\x20-\x7e]+$/.test(x);
1
+ const isASCII = (x) => /^[\x00-\x7f]+$/.test(x);
2
+ const isPrintableASCII = (x) => /^[\x20-\x7e]+$/.test(x);
3
+ export {
4
+ isASCII,
5
+ isPrintableASCII
6
+ };
@@ -1 +1,4 @@
1
- export const isAsyncIterable = (x) => x != null && typeof x[Symbol.asyncIterator] === "function";
1
+ const isAsyncIterable = (x) => x != null && typeof x[Symbol.asyncIterator] === "function";
2
+ export {
3
+ isAsyncIterable
4
+ };
package/is-bigint.js CHANGED
@@ -1 +1,4 @@
1
- export const isBigInt = (x) => typeof x === "bigint";
1
+ const isBigInt = (x) => typeof x === "bigint";
2
+ export {
3
+ isBigInt
4
+ };
package/is-blob.js CHANGED
@@ -1 +1,4 @@
1
- export const isBlob = (x) => x instanceof Blob;
1
+ const isBlob = (x) => x instanceof Blob;
2
+ export {
3
+ isBlob
4
+ };
package/is-boolean.js CHANGED
@@ -1 +1,4 @@
1
- export const isBoolean = (x) => typeof x === "boolean";
1
+ const isBoolean = (x) => typeof x === "boolean";
2
+ export {
3
+ isBoolean
4
+ };
package/is-chrome.js CHANGED
@@ -1 +1,4 @@
1
- export const isChrome = () => typeof window !== "undefined" && !!window["chrome"];
1
+ const isChrome = () => typeof window !== "undefined" && !!window["chrome"];
2
+ export {
3
+ isChrome
4
+ };
package/is-data-url.js CHANGED
@@ -1 +1,4 @@
1
- export const isDataURL = (x) => /^data:.+\/(.+);base64,/.test(x);
1
+ const isDataURL = (x) => /^data:.+\/(.+);base64,/.test(x);
2
+ export {
3
+ isDataURL
4
+ };
package/is-date.js CHANGED
@@ -1 +1,4 @@
1
- export const isDate = (x) => x instanceof Date;
1
+ const isDate = (x) => x instanceof Date;
2
+ export {
3
+ isDate
4
+ };
package/is-even.js CHANGED
@@ -1 +1,4 @@
1
- export const isEven = (x) => x % 2 === 0;
1
+ const isEven = (x) => x % 2 === 0;
2
+ export {
3
+ isEven
4
+ };
package/is-false.js CHANGED
@@ -1 +1,4 @@
1
- export const isFalse = (x) => x === false;
1
+ const isFalse = (x) => x === false;
2
+ export {
3
+ isFalse
4
+ };
package/is-file.js CHANGED
@@ -1 +1,4 @@
1
- export const isFile = (x) => x instanceof File;
1
+ const isFile = (x) => x instanceof File;
2
+ export {
3
+ isFile
4
+ };
package/is-firefox.js CHANGED
@@ -1 +1,4 @@
1
- export const isFirefox = () => typeof window !== "undefined" && !!window["InstallTrigger"];
1
+ const isFirefox = () => typeof window !== "undefined" && !!window["InstallTrigger"];
2
+ export {
3
+ isFirefox
4
+ };
@@ -1,2 +1,5 @@
1
1
  const RE = /^(?:[-+]?(?:[0-9]+))?(?:\.[0-9]*)?(?:[eE][\+\-]?(?:[0-9]+))?$/;
2
- export const isFloatString = (x) => x.length > 0 && RE.test(x);
2
+ const isFloatString = (x) => x.length > 0 && RE.test(x);
3
+ export {
4
+ isFloatString
5
+ };
package/is-function.js CHANGED
@@ -1 +1,4 @@
1
- export const isFunction = (x) => typeof x === "function";
1
+ const isFunction = (x) => typeof x === "function";
2
+ export {
3
+ isFunction
4
+ };
package/is-generator.js CHANGED
@@ -1,9 +1,6 @@
1
1
  import { implementsFunction } from "./implements-function.js";
2
2
  import { isIterable } from "./is-iterable.js";
3
- /**
4
- * Returns true if `x` is an instantiated ES6 generator (i.e. it
5
- * {@link isIterable} and {@link implementsFunction} `next`).
6
- *
7
- * @param x
8
- */
9
- export const isGenerator = (x) => isIterable(x) && implementsFunction(x, "next");
3
+ const isGenerator = (x) => isIterable(x) && implementsFunction(x, "next");
4
+ export {
5
+ isGenerator
6
+ };
package/is-hex-color.js CHANGED
@@ -1,3 +1,6 @@
1
1
  import { isString } from "./is-string.js";
2
2
  const RE = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i;
3
- export const isHexColor = (x) => isString(x) && RE.test(x);
3
+ const isHexColor = (x) => isString(x) && RE.test(x);
4
+ export {
5
+ isHexColor
6
+ };
package/is-hex.js CHANGED
@@ -1 +1,4 @@
1
- export const isHex = (x) => /^[a-f0-9]+$/i.test(x);
1
+ const isHex = (x) => /^[a-f0-9]+$/i.test(x);
2
+ export {
3
+ isHex
4
+ };
package/is-ie.js CHANGED
@@ -1,3 +1,4 @@
1
- export const isIE = () => typeof document !== "undefined" &&
2
- (typeof document["documentMode"] !== "undefined" ||
3
- navigator.userAgent.indexOf("MSIE") > 0);
1
+ const isIE = () => typeof document !== "undefined" && (typeof document["documentMode"] !== "undefined" || navigator.userAgent.indexOf("MSIE") > 0);
2
+ export {
3
+ isIE
4
+ };
package/is-in-range.js CHANGED
@@ -1 +1,4 @@
1
- export const isInRange = (min, max, x) => x >= min && x <= max;
1
+ const isInRange = (min, max, x) => x >= min && x <= max;
2
+ export {
3
+ isInRange
4
+ };
package/is-int-string.js CHANGED
@@ -1,2 +1,5 @@
1
1
  const RE = /^(?:[-+]?(?:0|[1-9][0-9]*))$/;
2
- export const isIntString = (x) => RE.test(x);
2
+ const isIntString = (x) => RE.test(x);
3
+ export {
4
+ isIntString
5
+ };
package/is-int32.js CHANGED
@@ -1 +1,4 @@
1
- export const isInt32 = (x) => typeof x === "number" && (x | 0) === x;
1
+ const isInt32 = (x) => typeof x === "number" && (x | 0) === x;
2
+ export {
3
+ isInt32
4
+ };
package/is-iterable.js CHANGED
@@ -1 +1,4 @@
1
- export const isIterable = (x) => x != null && typeof x[Symbol.iterator] === "function";
1
+ const isIterable = (x) => x != null && typeof x[Symbol.iterator] === "function";
2
+ export {
3
+ isIterable
4
+ };
package/is-map.js CHANGED
@@ -1 +1,4 @@
1
- export const isMap = (x) => x instanceof Map;
1
+ const isMap = (x) => x instanceof Map;
2
+ export {
3
+ isMap
4
+ };
package/is-mobile.js CHANGED
@@ -1,2 +1,6 @@
1
- export const isMobile = () => typeof navigator !== "undefined" &&
2
- /mobile|tablet|ip(ad|hone|od)|android|silk|crios/i.test(navigator.userAgent);
1
+ const isMobile = () => typeof navigator !== "undefined" && /mobile|tablet|ip(ad|hone|od)|android|silk|crios/i.test(
2
+ navigator.userAgent
3
+ );
4
+ export {
5
+ isMobile
6
+ };
package/is-nan.js CHANGED
@@ -1 +1,4 @@
1
- export const isNaN = (x) => x !== x;
1
+ const isNaN = (x) => x !== x;
2
+ export {
3
+ isNaN
4
+ };
package/is-negative.js CHANGED
@@ -1 +1,4 @@
1
- export const isNegative = (x) => typeof x === "number" && x < 0;
1
+ const isNegative = (x) => typeof x === "number" && x < 0;
2
+ export {
3
+ isNegative
4
+ };
package/is-nil.js CHANGED
@@ -1,5 +1,4 @@
1
- /**
2
- * Checks if x is null or undefined.
3
- *
4
- */
5
- export const isNil = (x) => x == null;
1
+ const isNil = (x) => x == null;
2
+ export {
3
+ isNil
4
+ };
package/is-node.js CHANGED
@@ -1,3 +1,4 @@
1
- export const isNode = () => typeof process === "object" &&
2
- typeof process.versions === "object" &&
3
- typeof process.versions.node !== "undefined";
1
+ const isNode = () => typeof process === "object" && typeof process.versions === "object" && typeof process.versions.node !== "undefined";
2
+ export {
3
+ isNode
4
+ };
@@ -1,3 +1,4 @@
1
- export const isNotStringAndIterable = (x) => x != null &&
2
- typeof x !== "string" &&
3
- typeof x[Symbol.iterator] === "function";
1
+ const isNotStringAndIterable = (x) => x != null && typeof x !== "string" && typeof x[Symbol.iterator] === "function";
2
+ export {
3
+ isNotStringAndIterable
4
+ };
package/is-null.js CHANGED
@@ -1 +1,4 @@
1
- export const isNull = (x) => x === null;
1
+ const isNull = (x) => x === null;
2
+ export {
3
+ isNull
4
+ };
package/is-number.js CHANGED
@@ -1 +1,4 @@
1
- export const isNumber = (x) => typeof x === "number";
1
+ const isNumber = (x) => typeof x === "number";
2
+ export {
3
+ isNumber
4
+ };
package/is-numeric.js CHANGED
@@ -1,14 +1,6 @@
1
- /**
2
- * Returns true if given string contains only digits, and optionally, a sign
3
- * prefix.
4
- *
5
- * @param x -
6
- */
7
- export const isNumericInt = (x) => /^[-+]?\d+$/.test(x);
8
- /**
9
- * Returns true if given string only contains an integer or floating point
10
- * number, optionally in scientific notiation (e.g. `-123.45e-6`).
11
- *
12
- * @param x -
13
- */
14
- export const isNumericFloat = (x) => /^[-+]?\d*\.?\d+(e[-+]?\d+)?$/i.test(x);
1
+ const isNumericInt = (x) => /^[-+]?\d+$/.test(x);
2
+ const isNumericFloat = (x) => /^[-+]?\d*\.?\d+(e[-+]?\d+)?$/i.test(x);
3
+ export {
4
+ isNumericFloat,
5
+ isNumericInt
6
+ };
package/is-object.js CHANGED
@@ -1 +1,4 @@
1
- export const isObject = (x) => x !== null && typeof x === "object";
1
+ const isObject = (x) => x !== null && typeof x === "object";
2
+ export {
3
+ isObject
4
+ };
package/is-odd.js CHANGED
@@ -1 +1,4 @@
1
- export const isOdd = (x) => x % 2 !== 0;
1
+ const isOdd = (x) => x % 2 !== 0;
2
+ export {
3
+ isOdd
4
+ };
@@ -1,13 +1,8 @@
1
1
  const OBJP = Object.getPrototypeOf;
2
- /**
3
- * Similar to {@link isObject}, but also checks if prototype is that of
4
- * `Object` (or `null`).
5
- *
6
- * @param x -
7
- */
8
- export const isPlainObject = (x) => {
9
- let p;
10
- return (x != null &&
11
- typeof x === "object" &&
12
- ((p = OBJP(x)) === null || OBJP(p) === null));
2
+ const isPlainObject = (x) => {
3
+ let p;
4
+ return x != null && typeof x === "object" && ((p = OBJP(x)) === null || OBJP(p) === null);
5
+ };
6
+ export {
7
+ isPlainObject
13
8
  };
package/is-positive.js CHANGED
@@ -1 +1,4 @@
1
- export const isPositive = (x) => typeof x === "number" && x > 0;
1
+ const isPositive = (x) => typeof x === "number" && x > 0;
2
+ export {
3
+ isPositive
4
+ };
package/is-primitive.js CHANGED
@@ -1,9 +1,7 @@
1
- /**
2
- * Returns true if `x` is a string, number or boolean.
3
- *
4
- * @param x -
5
- */
6
- export const isPrimitive = (x) => {
7
- const t = typeof x;
8
- return t === "string" || t === "number" || t === "boolean";
1
+ const isPrimitive = (x) => {
2
+ const t = typeof x;
3
+ return t === "string" || t === "number" || t === "boolean";
4
+ };
5
+ export {
6
+ isPrimitive
9
7
  };
package/is-promise.js CHANGED
@@ -1 +1,4 @@
1
- export const isPromise = (x) => x instanceof Promise;
1
+ const isPromise = (x) => x instanceof Promise;
2
+ export {
3
+ isPromise
4
+ };
package/is-promiselike.js CHANGED
@@ -1,3 +1,5 @@
1
1
  import { implementsFunction } from "./implements-function.js";
2
- export const isPromiseLike = (x) => x instanceof Promise ||
3
- (implementsFunction(x, "then") && implementsFunction(x, "catch"));
2
+ const isPromiseLike = (x) => x instanceof Promise || implementsFunction(x, "then") && implementsFunction(x, "catch");
3
+ export {
4
+ isPromiseLike
5
+ };
package/is-proto-path.js CHANGED
@@ -1,33 +1,9 @@
1
1
  import { isArray } from "./is-array.js";
2
2
  import { isString } from "./is-string.js";
3
- const ILLEGAL_KEYS = new Set(["__proto__", "prototype", "constructor"]);
4
- /**
5
- * Returns true, if given `x` is an illegal object key as per
6
- * {@link ILLEGAL_KEYS}.
7
- *
8
- * @see {@link isProtoPath} for more details
9
- *
10
- * @param x -
11
- */
12
- export const isIllegalKey = (x) => ILLEGAL_KEYS.has(x);
13
- /**
14
- * Returns true if given `path` contains any {@link ILLEGAL_KEYS}, i.e. could be
15
- * used to poison the prototype chain of an object.
16
- *
17
- * @remarks
18
- * If given an array, each item is considered a single sub-path property and
19
- * will be checked as is. If given a string it will be split using "." as
20
- * delimiter and each item checked as is (same way array paths are handled).
21
- *
22
- * Original discussion here, implementation updated to be more encompassing:
23
- * https://github.com/thi-ng/umbrella/pull/273
24
- *
25
- * @param path -
26
- */
27
- export const isProtoPath = (path) => isArray(path)
28
- ? path.some(isIllegalKey)
29
- : isString(path)
30
- ? path.indexOf(".") !== -1
31
- ? path.split(".").some(isIllegalKey)
32
- : isIllegalKey(path)
33
- : false;
3
+ const ILLEGAL_KEYS = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
4
+ const isIllegalKey = (x) => ILLEGAL_KEYS.has(x);
5
+ const isProtoPath = (path) => isArray(path) ? path.some(isIllegalKey) : isString(path) ? path.indexOf(".") !== -1 ? path.split(".").some(isIllegalKey) : isIllegalKey(path) : false;
6
+ export {
7
+ isIllegalKey,
8
+ isProtoPath
9
+ };
package/is-regexp.js CHANGED
@@ -1 +1,4 @@
1
- export const isRegExp = (x) => x instanceof RegExp;
1
+ const isRegExp = (x) => x instanceof RegExp;
2
+ export {
3
+ isRegExp
4
+ };
package/is-safari.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { isChrome } from "./is-chrome.js";
2
- export const isSafari = () => typeof navigator !== "undefined" &&
3
- /Safari/.test(navigator.userAgent) &&
4
- !isChrome();
2
+ const isSafari = () => typeof navigator !== "undefined" && /Safari/.test(navigator.userAgent) && !isChrome();
3
+ export {
4
+ isSafari
5
+ };
package/is-set.js CHANGED
@@ -1 +1,4 @@
1
- export const isSet = (x) => x instanceof Set;
1
+ const isSet = (x) => x instanceof Set;
2
+ export {
3
+ isSet
4
+ };
package/is-string.js CHANGED
@@ -1 +1,4 @@
1
- export const isString = (x) => typeof x === "string";
1
+ const isString = (x) => typeof x === "string";
2
+ export {
3
+ isString
4
+ };
package/is-symbol.js CHANGED
@@ -1 +1,4 @@
1
- export const isSymbol = (x) => typeof x === "symbol";
1
+ const isSymbol = (x) => typeof x === "symbol";
2
+ export {
3
+ isSymbol
4
+ };
package/is-touch-event.js CHANGED
@@ -1,8 +1,4 @@
1
- /**
2
- * On Firefox `TouchEvent` is undefined if the hardware doesn't support touch.
3
- * Therefore this predicate checks for that first before verifying if `e` is
4
- * indeed a `TouchEvent`.
5
- *
6
- * @param e
7
- */
8
- export const isTouchEvent = (e) => typeof TouchEvent !== "undefined" && e instanceof TouchEvent;
1
+ const isTouchEvent = (e) => typeof TouchEvent !== "undefined" && e instanceof TouchEvent;
2
+ export {
3
+ isTouchEvent
4
+ };
@@ -1,4 +1,4 @@
1
- export const isTransferable = (x) => x instanceof ArrayBuffer ||
2
- (typeof SharedArrayBuffer !== "undefined" &&
3
- x instanceof SharedArrayBuffer) ||
4
- (typeof MessagePort !== "undefined" && x instanceof MessagePort);
1
+ const isTransferable = (x) => x instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && x instanceof SharedArrayBuffer || typeof MessagePort !== "undefined" && x instanceof MessagePort;
2
+ export {
3
+ isTransferable
4
+ };
package/is-true.js CHANGED
@@ -1 +1,4 @@
1
- export const isTrue = (x) => x === true;
1
+ const isTrue = (x) => x === true;
2
+ export {
3
+ isTrue
4
+ };
package/is-typedarray.js CHANGED
@@ -1,10 +1,4 @@
1
- export const isTypedArray = (x) => !!x &&
2
- (x instanceof Float32Array ||
3
- x instanceof Float64Array ||
4
- x instanceof Uint32Array ||
5
- x instanceof Int32Array ||
6
- x instanceof Uint8Array ||
7
- x instanceof Int8Array ||
8
- x instanceof Uint16Array ||
9
- x instanceof Int16Array ||
10
- x instanceof Uint8ClampedArray);
1
+ const isTypedArray = (x) => !!x && (x instanceof Float32Array || x instanceof Float64Array || x instanceof Uint32Array || x instanceof Int32Array || x instanceof Uint8Array || x instanceof Int8Array || x instanceof Uint16Array || x instanceof Int16Array || x instanceof Uint8ClampedArray);
2
+ export {
3
+ isTypedArray
4
+ };
package/is-uint32.js CHANGED
@@ -1 +1,4 @@
1
- export const isUint32 = (x) => typeof x === "number" && x >>> 0 === x;
1
+ const isUint32 = (x) => typeof x === "number" && x >>> 0 === x;
2
+ export {
3
+ isUint32
4
+ };
package/is-undefined.js CHANGED
@@ -1 +1,4 @@
1
- export const isUndefined = (x) => x === undefined;
1
+ const isUndefined = (x) => x === void 0;
2
+ export {
3
+ isUndefined
4
+ };
package/is-uuid.js CHANGED
@@ -1,2 +1,5 @@
1
1
  const RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
2
- export const isUUID = (x) => RE.test(x);
2
+ const isUUID = (x) => RE.test(x);
3
+ export {
4
+ isUUID
5
+ };
package/is-uuid4.js CHANGED
@@ -1,2 +1,5 @@
1
1
  const RE = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
2
- export const isUUIDv4 = (x) => RE.test(x);
2
+ const isUUIDv4 = (x) => RE.test(x);
3
+ export {
4
+ isUUIDv4
5
+ };
package/is-zero.js CHANGED
@@ -1 +1,4 @@
1
- export const isZero = (x) => x === 0;
1
+ const isZero = (x) => x === 0;
2
+ export {
3
+ isZero
4
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/checks",
3
- "version": "3.4.10",
3
+ "version": "3.4.12",
4
4
  "description": "Collection of 70+ type, feature & value checks",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -28,7 +28,9 @@
28
28
  ],
29
29
  "license": "Apache-2.0",
30
30
  "scripts": {
31
- "build": "yarn clean && tsc --declaration",
31
+ "build": "yarn build:esbuild && yarn build:decl",
32
+ "build:decl": "tsc --declaration --emitDeclarationOnly",
33
+ "build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
32
34
  "clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc",
33
35
  "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
34
36
  "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
@@ -41,8 +43,8 @@
41
43
  },
42
44
  "devDependencies": {
43
45
  "@microsoft/api-extractor": "^7.38.3",
44
- "@thi.ng/testament": "^0.4.3",
45
46
  "@types/node": "^20.10.2",
47
+ "esbuild": "^0.19.8",
46
48
  "rimraf": "^5.0.5",
47
49
  "tools": "^0.0.1",
48
50
  "typedoc": "^0.25.4",
@@ -278,5 +280,5 @@
278
280
  "default": "./is-zero.js"
279
281
  }
280
282
  },
281
- "gitHead": "04d1de79f256d7a53c6b5fd157b37f49bc88e11d\n"
283
+ "gitHead": "5e7bafedfc3d53bc131469a28de31dd8e5b4a3ff\n"
282
284
  }