* Get Command Line Arguments * * * This method allows you to retrieve the value of the specified command line argument. * * * * The argument is case sensitive, and must be of the form '--ARG_NAME=value' * * * @method getCmdLineArg * @param {s
(searchFor)
| 893 | * @return {false|string} false if the argument was not found, the argument value if found |
| 894 | */ |
| 895 | getCmdLineArg(searchFor) { |
| 896 | const cmdLineArgs = process.argv.slice(2, process.argv.length); |
| 897 | const argName = '--' + searchFor + '='; |
| 898 | |
| 899 | for (let argvIt = 0; argvIt < cmdLineArgs.length; argvIt++) { |
| 900 | if (cmdLineArgs[argvIt].indexOf(argName) === 0) { |
| 901 | return cmdLineArgs[argvIt].substr(argName.length); |
| 902 | } |
| 903 | } |
| 904 | |
| 905 | return false; |
| 906 | } |
| 907 | |
| 908 | /** |
| 909 | * <p>Get a Config Environment Variable Value</p> |
no outgoing calls
no test coverage detected