@efebia/env-loader 0.0.7 → 0.0.9

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/lib/client.js CHANGED
@@ -57,6 +57,8 @@ class EnvironmentClient {
57
57
  }
58
58
  catch (_a) { }
59
59
  }
60
+ if (listKeys.length === 1)
61
+ return values[listKeys[0]];
60
62
  return values;
61
63
  }
62
64
  ;
package/lib/processEnv.js CHANGED
@@ -18,6 +18,8 @@ const tryParseInt = (value) => {
18
18
  return null;
19
19
  };
20
20
  const tryParseFloat = (value) => {
21
+ if (!/^(\d|\.)+$/.test(value))
22
+ return null;
21
23
  const parsed = parseFloat(value);
22
24
  if (isNaN(parsed))
23
25
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@efebia/env-loader",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "license": "MIT",
5
5
  "devDependencies": {
6
6
  "@types/jest": "^29.2.5",