sort-array
sort-array copied to clipboard
Should be possible to sort using a standard compare function
Update customOrders to also accept a standard sort compare function.
E.g.
sortArray(partsOfTheDay, {
order: 'time',
customOrders: {
time: (a, b) => return a > b ? 1 : -1 // etc
}
})