commandDispatcher: copypaste moment pt2 (no eslint edition)

This commit is contained in:
Cynthia Foxwell 2022-11-29 19:39:12 -07:00
parent 153b91fb3c
commit 9d1ff77b11

View file

@ -33,13 +33,13 @@ function parseAsArgv(argv) {
: removeStartHyphens(arg.slice(0, equalsIndex)); : removeStartHyphens(arg.slice(0, equalsIndex));
if (equalsIndex !== -1) { if (equalsIndex !== -1) {
props[argName] = convertIfApplicable(arg.slice(equalsIndex + 1)); optional[argName] = convertIfApplicable(arg.slice(equalsIndex + 1));
} else if (arg.charAt(0) === "-") { } else if (arg.charAt(0) === "-") {
if (arg.charAt(1) === "-") { if (arg.charAt(1) === "-") {
props[argName] = true; optional[argName] = true;
} else { } else {
for (let b = 0; b < argName.length; b++) { for (let b = 0; b < argName.length; b++) {
props[argName.charAt(b)] = true; optional[argName.charAt(b)] = true;
} }
} }
} else { } else {