Ox.sortBy fails for trivial example #271

Closed
opened 2014-10-01 14:39:57 +00:00 by rlx · 1 comment
Owner
> JSON.stringify(Ox.sortBy([{name: 'A Team'}, {name: 'B Team'}, {name: 'C Team'}], 'name'))
"[{"name":"B Team"},{"name":"C Team"},{"name":"A Team"}]"
``` > JSON.stringify(Ox.sortBy([{name: 'A Team'}, {name: 'B Team'}, {name: 'C Team'}], 'name')) "[{"name":"B Team"},{"name":"C Team"},{"name":"A Team"}]" ```
rlx added the
Ox
label 2014-10-01 14:39:57 +00:00
rlx self-assigned this 2014-10-01 14:39:57 +00:00
rlx added the
severity: major
defect
0.1
0.1
labels 2014-10-01 14:39:57 +00:00
Author
Owner

It's a feature, not a bug :)

"A Team" sorts as "Team, A" (indefinite article).

If you don't want that behavior, pass a map function to sortBy (and, for example, replace spaces with underscores)

It's a feature, not a bug :) "A Team" sorts as "Team, A" (indefinite article). If you don't want that behavior, pass a map function to sortBy (and, for example, replace spaces with underscores)
rlx added the
wontfix
label 2014-10-01 14:49:48 +00:00
rlx closed this issue 2014-10-01 14:49:48 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: 0x2620/oxjs#271
No description provided.