-
Notifications
You must be signed in to change notification settings - Fork 26
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
Support argument normalizer/validator #103
Comments
Are you thinking of a validator/normalizer that normalizes value for ( |
Yes, In In They are different feature. What's your opinion? :) |
Just ran into this need myself. Seems like a zod-like thing's needed here. I need to both validate and normalize
|
For my usecase, I accept a logLevel arg and I'm looking to normalize/transform it to either an enum or a number alongside validation. Would this kind type transformation be a responsibilty of the |
Describe the feature
I am using
citty
in my project, And I think it's maybe a good idea to support it. 👀This is my source code:
And support
formatter
attribute in args definition, then we can do like this:Additional information
The text was updated successfully, but these errors were encountered: