Created
November 23, 2015 10:18
-
-
Save lamchau/1269d44b6dc72d945c59 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment