sindresorhus/sort-on

Add the ability to sort boolean values

开放

#18 创建于 2020年3月21日

 (3 条评论) (0 个反应) (0 位负责人)JavaScript (14 个派生)user submission
enhancementhelp wanted

仓库指标

星标
 (200 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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! 😄

贡献者指南