-
Notifications
You must be signed in to change notification settings - Fork 215
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
Implement malli.util/select, similar to spec-alpha2/select #724
Comments
I may have a working example here, but is almost definitely missing some edge cases and can definitely be implemented much more easily/performantly... I'm just not sure how. |
Hacked around another implementation of Edit: We could have select-eql, require-eql and optional-eql, equivalents to *-keys that operate on EQL instead of keys vector |
Oh good call with the gist, here's my implementation, which makes all non-selected keys optional. |
Any updates on this ? Watched the "Maybe not" talk by Rich Hickey and having composability of specs looks really good |
I'm also interested in this |
I released https://github.com/eval/malli-select. It allows for selecting across |
I think it would be pretty great to have a malli equivalent to the spec-alpha2/select. For those that don't know,
select
would take a schema and a keyset, and mark all keys not in the keyset as optional. For example:select should also allow for selecting subkeys. For example, here we mark the root level key as optional, but if it exists, :c is required:
I think this would be great, and serve much the same need as the spec-alpha2/select function. I've taken a couple cracks at implementing this myself, but haven't quite figured it out.
The text was updated successfully, but these errors were encountered: