Skip to content

Instantly share code, notes, and snippets.

@agtokty
Created February 5, 2017 19:27
Show Gist options
  • Save agtokty/e252cd88f15dc27c1ced943e99cb150b to your computer and use it in GitHub Desktop.
Save agtokty/e252cd88f15dc27c1ced943e99cb150b to your computer and use it in GitHub Desktop.
var cVal = getParam(process.argv,"--c");//kek
var tVal = getParam(process.argv,"--t");//lol
function getParam(argv, paramName){
if (argv.indexOf(paramName) != -1)
return argv[argv.indexOf(paramName) + 1];
else
return null;
}
console.log( " --c value : " + cVal);
console.log( " --t value : " + tVal);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment