File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2
2
* Internal function to retrieve env vars, with no error handling.
3
3
* @returns String value of env variable or undefined if not found.
4
4
*/
5
- function _getConfig ( key : string ) : string | undefined {
5
+ function getEnvVar ( key : string ) : string | undefined {
6
6
const env : Record < string , string | undefined > =
7
7
( typeof global !== 'undefined' ? global : window ) ?. process ?. env || { } ;
8
8
@@ -31,11 +31,11 @@ function getConfig(
31
31
if ( ! key ) {
32
32
throw new Error ( '"key" must be provided to getConfig()' ) ;
33
33
}
34
- const isTestEnvironment = _getConfig ( 'NODE_ENV' ) === 'test' ;
34
+ const isTestEnvironment = getEnvVar ( 'NODE_ENV' ) === 'test' ;
35
35
36
36
const { warn = ! isTestEnvironment , nullishString = false } = options ;
37
37
38
- const value = _getConfig ( key ) ;
38
+ const value = getEnvVar ( key ) ;
39
39
40
40
if ( value == null ) {
41
41
if ( warn ) {
You can’t perform that action at this time.
0 commit comments