Code coverage report for node/src/node-env-loader.ts

Statements: 12.5% (1 / 8)      Branches: 0% (0 / 5)      Functions: 0% (0 / 2)      Lines: 14.29% (1 / 7)      Ignored: none     

All files » node/src/ » node-env-loader.ts
1 2 3 4 5 6 7 8 9 10 11 121                      
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;
}