-
-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedpull requests welcomepull requests welcome
Description
Consider this block:
Lines 52 to 66 in 62fde7d
| Object.keys(opts.alias || {}).forEach(function (key) { | |
| aliases[key] = [].concat(opts.alias[key]); | |
| aliases[key].forEach(function (x) { | |
| aliases[x] = [key].concat(aliases[key].filter(function (y) { | |
| return x !== y; | |
| })); | |
| }); | |
| }); | |
| [].concat(opts.string).filter(Boolean).forEach(function (key) { | |
| flags.strings[key] = true; | |
| if (aliases[key]) { | |
| flags.strings[aliases[key]] = true; | |
| } | |
| }); |
Here it builds an array of aliased args:
Lines 55 to 57 in 62fde7d
| aliases[x] = [key].concat(aliases[key].filter(function (y) { | |
| return x !== y; | |
| })); |
And here it uses this array as a key for strings:
Line 64 in 62fde7d
| flags.strings[aliases[key]] = true; |
Which will just result in:
{
strings: {
"[object Object]": true
}
}It should either build flat aliases or iterate over the nested array
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedpull requests welcomepull requests welcome