1 2 3 4 5 6 7 8 9 10 11 12 | 1 | export function processEnvLoader(filter: (key: string, value: string) => boolean = () => true): Record<string, string> { const props: Record<string, string> = {}; const env = { ...process.env }; for (const entry of Object.entries(env)) { if (entry[1] && filter(entry[0], entry[1])) { props[entry[0]] = entry[1]; } } return props; } |