Skip to content

Commit 50eab48

Browse files
committed
getConfig: underscore-dangle stylefix for internal function
1 parent a9d954f commit 50eab48

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client/utils/getConfig.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Internal function to retrieve env vars, with no error handling.
33
* @returns String value of env variable or undefined if not found.
44
*/
5-
function _getConfig(key: string): string | undefined {
5+
function getEnvVar(key: string): string | undefined {
66
const env: Record<string, string | undefined> =
77
(typeof global !== 'undefined' ? global : window)?.process?.env || {};
88

@@ -31,11 +31,11 @@ function getConfig(
3131
if (!key) {
3232
throw new Error('"key" must be provided to getConfig()');
3333
}
34-
const isTestEnvironment = _getConfig('NODE_ENV') === 'test';
34+
const isTestEnvironment = getEnvVar('NODE_ENV') === 'test';
3535

3636
const { warn = !isTestEnvironment, nullishString = false } = options;
3737

38-
const value = _getConfig(key);
38+
const value = getEnvVar(key);
3939

4040
if (value == null) {
4141
if (warn) {

0 commit comments

Comments
 (0)