The built-in Array.prototype.sort() has a default comparator that sorts in ascending order
according to the string representation of the items. However, this behavior is rarely the most sound
option for real world use cases, and Flurp has therefore not included such an option among
its comparators.
Returns a new array sorted according to the
comparator
function. The comparator module contains some useful comparator functions and utilities for creating others. You may also write your own comparators, provided that they follow the specifications found in [MDN onArray.prototype.sort()
] (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).Remarks
The built-in
Array.prototype.sort()
has a default comparator that sorts in ascending order according to the string representation of the items. However, this behavior is rarely the most sound option for real world use cases, and Flurp has therefore not included such an option among its comparators.Example