( obj: Record<string, string>, env: NodeJS.ProcessEnv = process.env, )
| 28 | |
| 29 | /** Apply expandEnvString to every value in a string-keyed map. */ |
| 30 | export function expandEnvObject( |
| 31 | obj: Record<string, string>, |
| 32 | env: NodeJS.ProcessEnv = process.env, |
| 33 | ): Record<string, string> { |
| 34 | const out: Record<string, string> = {}; |
| 35 | for (const [k, v] of Object.entries(obj)) { |
| 36 | out[k] = typeof v === 'string' ? expandEnvString(v, env) : v; |
| 37 | } |
| 38 | return out; |
| 39 | } |
no test coverage detected