who needs to check what EcmaScript mandates Array.protoype.sort() to be stable? Not me:
arr.sort((a,b) => (a.order - b.order) || a.name.localeCompare(b.name))
CleverLibre Social is an inclusive social instance for open discussion, learning, and community. All cultures welcome. Hate speech and harassment strictly forbidden.