@andrew_l/toolkit 0.3.7 → 0.3.8
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/dist/index.cjs +12 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +12 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2866,19 +2866,19 @@ interface EnvParser {
|
|
|
2866
2866
|
/**
|
|
2867
2867
|
* NODE_ENV is `development`
|
|
2868
2868
|
*/
|
|
2869
|
-
isDevelopment: boolean;
|
|
2869
|
+
readonly isDevelopment: boolean;
|
|
2870
2870
|
/**
|
|
2871
2871
|
* NODE_ENV is `production`
|
|
2872
2872
|
*/
|
|
2873
|
-
isProduction: boolean;
|
|
2873
|
+
readonly isProduction: boolean;
|
|
2874
2874
|
/**
|
|
2875
2875
|
* NODE_ENV is `stage`
|
|
2876
2876
|
*/
|
|
2877
|
-
isStage: boolean;
|
|
2877
|
+
readonly isStage: boolean;
|
|
2878
2878
|
/**
|
|
2879
2879
|
* NODE_ENV is `test`
|
|
2880
2880
|
*/
|
|
2881
|
-
isTest: boolean;
|
|
2881
|
+
readonly isTest: boolean;
|
|
2882
2882
|
/**
|
|
2883
2883
|
* Returns `true` when environment key has set to `"true"`
|
|
2884
2884
|
*
|
package/dist/index.d.mts
CHANGED
|
@@ -2866,19 +2866,19 @@ interface EnvParser {
|
|
|
2866
2866
|
/**
|
|
2867
2867
|
* NODE_ENV is `development`
|
|
2868
2868
|
*/
|
|
2869
|
-
isDevelopment: boolean;
|
|
2869
|
+
readonly isDevelopment: boolean;
|
|
2870
2870
|
/**
|
|
2871
2871
|
* NODE_ENV is `production`
|
|
2872
2872
|
*/
|
|
2873
|
-
isProduction: boolean;
|
|
2873
|
+
readonly isProduction: boolean;
|
|
2874
2874
|
/**
|
|
2875
2875
|
* NODE_ENV is `stage`
|
|
2876
2876
|
*/
|
|
2877
|
-
isStage: boolean;
|
|
2877
|
+
readonly isStage: boolean;
|
|
2878
2878
|
/**
|
|
2879
2879
|
* NODE_ENV is `test`
|
|
2880
2880
|
*/
|
|
2881
|
-
isTest: boolean;
|
|
2881
|
+
readonly isTest: boolean;
|
|
2882
2882
|
/**
|
|
2883
2883
|
* Returns `true` when environment key has set to `"true"`
|
|
2884
2884
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -2866,19 +2866,19 @@ interface EnvParser {
|
|
|
2866
2866
|
/**
|
|
2867
2867
|
* NODE_ENV is `development`
|
|
2868
2868
|
*/
|
|
2869
|
-
isDevelopment: boolean;
|
|
2869
|
+
readonly isDevelopment: boolean;
|
|
2870
2870
|
/**
|
|
2871
2871
|
* NODE_ENV is `production`
|
|
2872
2872
|
*/
|
|
2873
|
-
isProduction: boolean;
|
|
2873
|
+
readonly isProduction: boolean;
|
|
2874
2874
|
/**
|
|
2875
2875
|
* NODE_ENV is `stage`
|
|
2876
2876
|
*/
|
|
2877
|
-
isStage: boolean;
|
|
2877
|
+
readonly isStage: boolean;
|
|
2878
2878
|
/**
|
|
2879
2879
|
* NODE_ENV is `test`
|
|
2880
2880
|
*/
|
|
2881
|
-
isTest: boolean;
|
|
2881
|
+
readonly isTest: boolean;
|
|
2882
2882
|
/**
|
|
2883
2883
|
* Returns `true` when environment key has set to `"true"`
|
|
2884
2884
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -4597,10 +4597,18 @@ const env = (() => {
|
|
|
4597
4597
|
})();
|
|
4598
4598
|
function createEnvParser(targetObject) {
|
|
4599
4599
|
return Object.freeze({
|
|
4600
|
-
isDevelopment
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4600
|
+
get isDevelopment() {
|
|
4601
|
+
return targetObject.NODE_ENV === "development";
|
|
4602
|
+
},
|
|
4603
|
+
get isProduction() {
|
|
4604
|
+
return targetObject.NODE_ENV === "production";
|
|
4605
|
+
},
|
|
4606
|
+
get isStage() {
|
|
4607
|
+
return targetObject.NODE_ENV === "state";
|
|
4608
|
+
},
|
|
4609
|
+
get isTest() {
|
|
4610
|
+
return targetObject.NODE_ENV === "test";
|
|
4611
|
+
},
|
|
4604
4612
|
bool(key, defaultValue = false) {
|
|
4605
4613
|
if (!(key in targetObject)) {
|
|
4606
4614
|
return defaultValue;
|