-
-
Notifications
You must be signed in to change notification settings - Fork 135
Description
🚀 Feature Proposal
The sort feature only accept true or false values.
As it uses sortObject method, which allows passing a custom comparator, please allow users to pass their custom comparator.
-> other option : implement a comparator that makes no difference between standard, uppercase and special characters (ie 'a' and 'à' is the same letter, 'a' and 'A' is the same letter).
The comparator should follow the spec /** A typical comparator for sorting object keys */ type KeyComparator = (a: string, b: string) => number (see https://github.com/bevry/sortobject/blob/master/source/index.ts)
Motivation
a = A : this seems obvious to me
a = à : I'm French and we use the real words as keys (ie "Cliquez ici": "Click here" instead of "global.button.click": "Click here").
Example
sort: function(a, b) { return a; },