-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Supporting wildcards #1912
Comments
Seems interesting, but how do you handle |
maybe that would need extra functions, e.g. setAll, deleteAll,... or a matcher function. On the other hand, it's proabably easier to just do |
What if we use come object type or constant value instead of plan string there? |
In case we have nested structure where array or map elements have similar structure, it becomes too cumbersome to write such update methods with Say we want to delete people's sensitive data when authenticated user signs out, so no sensitive data is displayed on the site page. If user is nested structure and we have something like |
After some though, it may be possible to inject a RegExp object in the path. What do you think? |
Yes, this is a good idea and provides even more flexibility |
RegEx could be keys too. Having a Map or Set with RegEx keys is unlikely, but not impossible. |
Supporting wildcards
It would be useful to be able to pass wildcards (
*
) in path forsetIn
removeIn
,updateIn
methods. A wildcard should match all elements in an array or all props in an object.Example
Out
The text was updated successfully, but these errors were encountered: