Sort an array with Falsy values first
const array = ["b", 0, "a"];array.sort(falsyFirst(stringComparator));console.log(array); // [0, "a", "b"]
a Comparator
the Comparator value type
Generated using TypeDoc
Example
Sort an array with Falsy values first
Returns
a Comparator