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))
QOTO: Question Others to Teach Ourselves An inclusive, Academic Freedom, instance All cultures welcome. Hate speech and harassment strictly forbidden.