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

Also support arrays wherever $ supports variadic parameters #231

Open
tsheaff opened this issue Sep 14, 2016 · 3 comments
Open

Also support arrays wherever $ supports variadic parameters #231

tsheaff opened this issue Sep 14, 2016 · 3 comments

Comments

@tsheaff
Copy link
Contributor

tsheaff commented Sep 14, 2016

For example I cannot currently do this:

$.omit(myDictionary, keys: ["one", "two", "three"])

But must instead do this:

$.omit(myDictionary, keys: "one", "two", "three")

For lots of design paradigms (e.g. my blacklisted set of keys is shared and represented as an array, or I've derived the list of keys from an API and don't have them as individual values), this is frustrating.

This thread indicates that there is no language-specific way to pass an array into a variadic parameter. Thus I think $ should support this (the variadic versions can call into the array versions)

@ankurp
Copy link
Owner

ankurp commented Sep 16, 2016

Good idea. Will add.

@tsheaff
Copy link
Contributor Author

tsheaff commented Sep 16, 2016

awesome

@danielmhanover
Copy link

+1

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

3 participants