sindresorhus / meow

🐈 CLI app helper
MIT License
3.53k stars 150 forks source link

Add `choices` option #228

Closed tommy-mitchell closed 1 year ago

tommy-mitchell commented 1 year ago

Closes #171. Continues from #183. Improves the error messages, adds tests cases, and aggregates option validation error messages.

Currently the choices array isn't validated to be the same type as the flag.

There were a couple of days in between starting and creating this PR, so I may have missed something.

tommy-mitchell commented 1 year ago

Updated with kebab-cased flags in errors and choices type validation.