Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add options.array #42

Open
ianwalter opened this issue Jun 4, 2019 · 1 comment
Open

Add options.array #42

ianwalter opened this issue Jun 4, 2019 · 1 comment

Comments

@ianwalter
Copy link

It would set the property to an array regardless if one flag is passed or multiple flags are passed.

getopts(["-t", "lunch"], { array: ["t"] }) //=> { t: ["lunch"] }

The current behavior is that t's value would be the string "lunch". This would help me eliminate some boilerplate code that checks if the value is a string or array.

@jorgebucaran
Copy link
Owner

@ianwalter Sounds good. 👍

ianwalter pushed a commit to ianwalter/getopts that referenced this issue Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants