@thexjs/env 1.0.0 → 1.0.1
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.
|
@@ -11,6 +11,7 @@ function num() {
|
|
|
11
11
|
return {
|
|
12
12
|
parse(input) {
|
|
13
13
|
if (input === void 0) throw new Error("Expected a number, got undefined");
|
|
14
|
+
if (input.trim() === "") throw new Error(`Expected a number, got "${input}"`);
|
|
14
15
|
const n = Number(input);
|
|
15
16
|
if (Number.isNaN(n)) throw new Error(`Expected a number, got "${input}"`);
|
|
16
17
|
return n;
|
package/dist/index.js
CHANGED
package/dist/validators.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thexjs/env",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Type-safe environment variable loading and validation for the x framework.",
|
|
5
5
|
"keywords": ["environment-variables", "env", "validation", "typescript", "config", "bun", "x"],
|
|
6
6
|
"license": "MIT",
|