-
Notifications
You must be signed in to change notification settings - Fork 7
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
“index” vs. function parameter: what’s the difference? #3
Comments
2 is an abbreviated version of 3. "key" equals to (x) => x.key Same for number and symbols. |
I think I'd be pretty confused if I learned that shortcut pattern on |
maybe we can add that |
That seems like it'd be better as a separate cross-cutting proposal, if so |
Agreed with @ljharb here. I think we should drop 2 for now, and possibly add it as its own proposal with all of the other array methods (particularly |
I think unique key is very common use case and I hope it could be included in this proposal. |
@hax I agree it's common; but it's already common for every array method that takes a function, not just this new one. |
Anything with a predicate seems like it’d apply the same to single or multiple keys. |
Maybe, but I feel |
I do too, but I’d think the same about unique with an array. |
in the last meeting, the committee requires to remove the |
@ljharb @jridgewell
|
given the similarity between |
I suggest we remove index parameter, and make non-function param throw TypeError so we could reconsider it in the future. |
Question about https://github.com/TechQuery/array-unique-proposal#core-features:
How is 2 different from 3?
The text was updated successfully, but these errors were encountered: