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 (200 stars) (14 forks)user submission
enhancementhelp wanted

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