Sorts the array according to the supplied function.
var sortByFirstItem = sortBy(x => x[0]); var pairs = [[-1, 1], [-2, 2], [-3, 3]]; sortByFirstItem(pairs); //=> [[-3, 3], [-2, 2], [-1, 1]]
A new array sorted by the keys generated by fn.
fn
Generated using TypeDoc
Sorts the array according to the supplied function.