Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* [
* "node",
* "node/process-2.js",
* "--app",
* "AppName"
* ]
* ) // "AppName"
*/
const getArgValue = (arg, program) =>
compose(
ifElse(equals(-1), always(null), x => program[x + 1]),
findIndex(equals(arg))
)(program);
const program = process.argv;
const programIncludes = includes(program);
const programNotInclude = notInclude(program);
/** optimize for development */
const debug = programNotInclude('--release');
/** level of debugging messages */
const verbose = programIncludes('--verbose');
/** if true, create proxy */
const proxy = programIncludes('--proxy');
/** if true, do not suport HMR */
const noHMR = programIncludes('--no-hmr');
/** if true, do not do anything SSR related */
const noSSR = programIncludes('--no-ssr');