sindresorhus/sort-on

Add the ability to sort boolean values

Open

#18 opened on Mar 21, 2020

View on GitHub
 (3 comments) (0 reactions) (0 assignees)JavaScript (14 forks)user submission
enhancementhelp wanted

Repository metrics

Stars
 (200 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Currently, invoking:

sortOn([{x: true}, {x: false}], 'x')

Is returning:

[{x: true}, {x: false}]

It would be nice to return the following instead:

[{x: false}, {x: true}]

Cheers! 😄

Contributor guide