(name: string)
| 9 | } |
| 10 | |
| 11 | export function getGlobalVariable<T = any>(name: string): T { |
| 12 | const value = process.env[ENV_PREFIX + name]; |
| 13 | if (value === undefined) { |
| 14 | throw new Error(`Trying to access variable "${name}" but it's not defined.`); |
| 15 | } |
| 16 | return JSON.parse(value) as T; |
| 17 | } |
| 18 | |
| 19 | export function getGlobalVariablesEnv(): NodeJS.ProcessEnv { |
| 20 | return Object.keys(process.env) |
no outgoing calls
no test coverage detected