Sorts the array according to the supplied function and keeping the order of elements.
const people = [ { name: 'Ann', age: 20 }, { name: 'Gary', age: 20 }, { name: 'John', age: 17 }, { name: 'Sam', age: 21 }, { name: 'Bob', age: 17 } ]; stableSortBy(path(['age']), people) => [ { name: 'John', age: 17 }, { name: 'Bob', age: 17 }, { name: 'Ann', age: 20 }, { name: 'Gary', age: 20 }, { name: 'Sam', age: 21 } ]
A new array sorted by the keys generated by fn.
fn
Generated using TypeDoc
Sorts the array according to the supplied function and keeping the order of elements.