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

SortBy #105

Open
tjmehta opened this issue Jul 23, 2015 · 3 comments
Open

SortBy #105

tjmehta opened this issue Jul 23, 2015 · 3 comments

Comments

@tjmehta
Copy link
Owner

tjmehta commented Jul 23, 2015

arr.sort(sortBy('key.path')) or arr.sort(sortBy('-key.path'))

@stoeffel
Copy link
Contributor

The - looks a little to magic for my taste. How about adding a second argument for the direction?
And maybe sortByKey would be a more expressive name?

@tjmehta
Copy link
Owner Author

tjmehta commented Jul 23, 2015

Good points. I'm with you on the first argument. Maybe it should take a mapping function, ex: it could be used in conjunction with pluck.


@tjmehta

On Wed, Jul 22, 2015 at 10:43 PM, Christoph Hermann
notifications@github.com wrote:

The - looks a little to magic for my taste. How about adding a second argument for the direction?

And maybe sortByKey would be a more expressive name?

Reply to this email directly or view it on GitHub:
#105 (comment)

@tjmehta
Copy link
Owner Author

tjmehta commented Jul 23, 2015

Although that becomes a lot of nested functions... Will have to think about this one..


@tjmehta

On Wed, Jul 22, 2015 at 10:43 PM, Christoph Hermann
notifications@github.com wrote:

The - looks a little to magic for my taste. How about adding a second argument for the direction?

And maybe sortByKey would be a more expressive name?

Reply to this email directly or view it on GitHub:
#105 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants