@thi.ng/checks 3.1.3 → 3.1.4
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 +1 -1
- package/README.md +2 -2
- package/is-ascii.d.ts +2 -2
- package/is-ascii.js +2 -2
- package/is-numeric.d.ts +2 -2
- package/is-numeric.js +2 -2
- package/is-primitive.d.ts +1 -1
- package/is-primitive.js +1 -1
- package/is-proto-path.d.ts +2 -2
- package/is-proto-path.js +2 -2
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
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.
|
|
55
|
+
Package sizes (gzipped, pre-treeshake): ESM: 1.71 KB
|
|
56
56
|
|
|
57
57
|
## Dependencies
|
|
58
58
|
|
|
@@ -88,4 +88,4 @@ If this project contributes to an academic publication, please cite it as:
|
|
|
88
88
|
|
|
89
89
|
## License
|
|
90
90
|
|
|
91
|
-
© 2016 -
|
|
91
|
+
© 2016 - 2022 Karsten Schmidt // Apache Software License 2.0
|
package/is-ascii.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns true iff all chars are in ASCII range [0x00 .. 0x7f]
|
|
3
3
|
*
|
|
4
|
-
* @param x
|
|
4
|
+
* @param x -
|
|
5
5
|
*/
|
|
6
6
|
export declare const isASCII: (x: string) => boolean;
|
|
7
7
|
/**
|
|
8
8
|
* Returns true iff all chars are in printable ASCII range [0x20 .. 0x7e]
|
|
9
9
|
*
|
|
10
|
-
* @param x
|
|
10
|
+
* @param x -
|
|
11
11
|
*/
|
|
12
12
|
export declare const isPrintableASCII: (x: string) => boolean;
|
|
13
13
|
//# sourceMappingURL=is-ascii.d.ts.map
|
package/is-ascii.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns true iff all chars are in ASCII range [0x00 .. 0x7f]
|
|
3
3
|
*
|
|
4
|
-
* @param x
|
|
4
|
+
* @param x -
|
|
5
5
|
*/
|
|
6
6
|
export const isASCII = (x) => /^[\x00-\x7f]+$/.test(x);
|
|
7
7
|
/**
|
|
8
8
|
* Returns true iff all chars are in printable ASCII range [0x20 .. 0x7e]
|
|
9
9
|
*
|
|
10
|
-
* @param x
|
|
10
|
+
* @param x -
|
|
11
11
|
*/
|
|
12
12
|
export const isPrintableASCII = (x) => /^[\x20-\x7e]+$/.test(x);
|
package/is-numeric.d.ts
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Returns true if given string contains only digits, and optionally, a sign
|
|
3
3
|
* prefix.
|
|
4
4
|
*
|
|
5
|
-
* @param x
|
|
5
|
+
* @param x -
|
|
6
6
|
*/
|
|
7
7
|
export declare const isNumericInt: (x: string) => boolean;
|
|
8
8
|
/**
|
|
9
9
|
* Returns true if given string only contains an integer or floating point
|
|
10
10
|
* number, optionally in scientific notiation (e.g. `-123.45e-6`).
|
|
11
11
|
*
|
|
12
|
-
* @param x
|
|
12
|
+
* @param x -
|
|
13
13
|
*/
|
|
14
14
|
export declare const isNumericFloat: (x: string) => boolean;
|
|
15
15
|
//# sourceMappingURL=is-numeric.d.ts.map
|
package/is-numeric.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* Returns true if given string contains only digits, and optionally, a sign
|
|
3
3
|
* prefix.
|
|
4
4
|
*
|
|
5
|
-
* @param x
|
|
5
|
+
* @param x -
|
|
6
6
|
*/
|
|
7
7
|
export const isNumericInt = (x) => /^[-+]?\d+$/.test(x);
|
|
8
8
|
/**
|
|
9
9
|
* Returns true if given string only contains an integer or floating point
|
|
10
10
|
* number, optionally in scientific notiation (e.g. `-123.45e-6`).
|
|
11
11
|
*
|
|
12
|
-
* @param x
|
|
12
|
+
* @param x -
|
|
13
13
|
*/
|
|
14
14
|
export const isNumericFloat = (x) => /^[-+]?\d*\.?\d+(e[-+]?\d+)?$/i.test(x);
|
package/is-primitive.d.ts
CHANGED
package/is-primitive.js
CHANGED
package/is-proto-path.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @see {@link isProtoPath} for more details
|
|
6
6
|
*
|
|
7
|
-
* @param x
|
|
7
|
+
* @param x -
|
|
8
8
|
*/
|
|
9
9
|
export declare const isIllegalKey: (x: any) => boolean;
|
|
10
10
|
/**
|
|
@@ -19,7 +19,7 @@ export declare const isIllegalKey: (x: any) => boolean;
|
|
|
19
19
|
* Original discussion here, implementation updated to be more encompassing:
|
|
20
20
|
* https://github.com/thi-ng/umbrella/pull/273
|
|
21
21
|
*
|
|
22
|
-
* @param path
|
|
22
|
+
* @param path -
|
|
23
23
|
*/
|
|
24
24
|
export declare const isProtoPath: (path: string | number | readonly (string | number)[]) => boolean;
|
|
25
25
|
//# sourceMappingURL=is-proto-path.d.ts.map
|
package/is-proto-path.js
CHANGED
|
@@ -7,7 +7,7 @@ const ILLEGAL_KEYS = new Set(["__proto__", "prototype", "constructor"]);
|
|
|
7
7
|
*
|
|
8
8
|
* @see {@link isProtoPath} for more details
|
|
9
9
|
*
|
|
10
|
-
* @param x
|
|
10
|
+
* @param x -
|
|
11
11
|
*/
|
|
12
12
|
export const isIllegalKey = (x) => ILLEGAL_KEYS.has(x);
|
|
13
13
|
/**
|
|
@@ -22,7 +22,7 @@ export const isIllegalKey = (x) => ILLEGAL_KEYS.has(x);
|
|
|
22
22
|
* Original discussion here, implementation updated to be more encompassing:
|
|
23
23
|
* https://github.com/thi-ng/umbrella/pull/273
|
|
24
24
|
*
|
|
25
|
-
* @param path
|
|
25
|
+
* @param path -
|
|
26
26
|
*/
|
|
27
27
|
export const isProtoPath = (path) => isArray(path)
|
|
28
28
|
? path.some(isIllegalKey)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/checks",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
4
4
|
"description": "Collection of 50+ type, feature & value checks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"tslib": "^2.3.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@microsoft/api-extractor": "^7.19.
|
|
41
|
-
"@thi.ng/testament": "^0.2.
|
|
42
|
-
"@types/node": "^
|
|
40
|
+
"@microsoft/api-extractor": "^7.19.4",
|
|
41
|
+
"@thi.ng/testament": "^0.2.4",
|
|
42
|
+
"@types/node": "^17.0.21",
|
|
43
43
|
"rimraf": "^3.0.2",
|
|
44
44
|
"tools": "^0.0.1",
|
|
45
|
-
"typedoc": "^0.22.
|
|
46
|
-
"typescript": "^4.
|
|
45
|
+
"typedoc": "^0.22.13",
|
|
46
|
+
"typescript": "^4.6.2"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"detect",
|
|
@@ -266,5 +266,5 @@
|
|
|
266
266
|
"import": "./is-zero.js"
|
|
267
267
|
}
|
|
268
268
|
},
|
|
269
|
-
"gitHead": "
|
|
269
|
+
"gitHead": "0fc692a3225c068aacafdc4cb6140cf603c67ad8\n"
|
|
270
270
|
}
|