Skip to content

Should be possible to sort using a standard compare function #13

@75lb

Description

@75lb

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
  }
})

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions