Help Wantedfeature request
描述
I have a case where option x is a "choices" option allowing ['foo', 'bar', 'baz']. Option y implies x === 'foo'.
Current workaround is using check().
Maybe an API like this:
yargs.option('a')
.choices('a', ['foo', 'bar', 'baz'])
.option('b')
.implies('b', argv => argv.a === 'foo');
Also, "implies" seems like a misnomer to me. Putting my logician's hat on, if m implies n, then if m is true, n should also be true, right? I would then expect "implies" to set m if I supplied n. Granted, the types/values of m and n could be completely different, and I'm not asking for this functionality, but perhaps "depends on" or "requires option" would be more appropriate.