We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a08dfc6 commit 47857b9Copy full SHA for 47857b9
src/cli-flags-helper.js
@@ -18,14 +18,15 @@ const targetList = new Set([
18
]);
19
20
function getOnlyFlag(argv) {
21
- if (process.argv.indexOf("--only") != -1) {
22
- return process.argv[process.argv.indexOf("--only") + 1];
+ const onlyIndex = process.argv.indexOf("--only");
+ if (onlyIndex != -1) {
23
+ return process.argv[onlyIndex + 1];
24
}
25
26
27
module.exports = {
- getTarget: function() {
28
- let onlyArg = getOnlyFlag();
+ getTarget: () => {
29
+ const onlyArg = getOnlyFlag();
30
if (targetList.has(onlyArg)) {
31
return [onlyArg];
32
} else if (typeof ONLY != "undefined" && targetList.has(ONLY)) {
0 commit comments