var checkOption = function(optionName) { return process.argv.some(function(option) { if (option.indexOf("--", 0) === 0 && optionName) { return option.substr(2).toLowerCase() === optionName.toLowerCase(); } return false; }); };