Optionally takes an array of getter functions for fields to compare. In most cases, it is clearer to give them individually and explicitly with the compareField method.
Optionally takes a Collator. This is equivalent to giving it with the withCollator
method. By defaults uses a new Intl.Collator('da')
.
Creates a comparator based on the given fields and Collator.
Creates a comparator based on the given fields and Collator.
Adds a method to extract a given field which should be included in the comparison.
Sets the Collator used for comparing strings.
Allows fluently building a comparator which handles multiple fields in an object.