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

Let pick expect an Iterable instead of multiple optional args #35

Closed
Wikiwix opened this issue Feb 15, 2021 · 0 comments · Fixed by #40
Closed

Let pick expect an Iterable instead of multiple optional args #35

Wikiwix opened this issue Feb 15, 2021 · 0 comments · Fixed by #40

Comments

@Wikiwix
Copy link

Wikiwix commented Feb 15, 2021

The pick function takes multiple optional args, which has multiple downside to expecting an Iterable of args:

  • Allows for arbitrarily deep nesting
  • Allows for something like pick(json, 'some.key.inside.the.next'.split('.')) which might be easier to write especially for deeply nested JSONs wich always have String keys.
  • Allows to use the function more dynamically (e.g. without knowing the depth beforehand)
@Wikiwix Wikiwix changed the title Let pick expect an to Iterable instead of multiple optional args Let pick expect an Iterable instead of multiple optional args Feb 15, 2021
@passsy passsy closed this as completed in #40 Aug 1, 2021
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

Successfully merging a pull request may close this issue.

1 participant