From 575671d8c92833864017c0fde12bd0ec5db85bc5 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sun, 19 Jun 2016 20:49:13 +0200 Subject: [PATCH] more structure --- ts/index.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ts/index.ts b/ts/index.ts index fd231a8..fecad8d 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -20,7 +20,15 @@ let getEnvVarsRequired = (pathArg:string):string[] => { return result; } -let getEnvVarsAvailable = ():string[] => { +let getEnvVarsAvailable = (requiredEnvVarsArg:string[]):string[] => { let result = []; + for(let keyArg in requiredEnvVarsArg){ + let envVar = requiredEnvVarsArg[keyArg]; + if(process.env[envVar]){ + result.push(envVar); + } else { + + } + } return result; } \ No newline at end of file