Skip to content

Instantly share code, notes, and snippets.

@FrancoB411
Last active February 27, 2016 03:57
Show Gist options
  • Select an option

  • Save FrancoB411/b02dcabe332563a945bb to your computer and use it in GitHub Desktop.

Select an option

Save FrancoB411/b02dcabe332563a945bb to your computer and use it in GitHub Desktop.
const args = ['node', '--proxy='];
const flags = ['proxy'];
let hasProxy = (arg) => flags.find(flag => arg.includes(flag));
if(args.find(hasProxy)) {
console.log("proxy");
} else {
console.log("error");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment