export function sortedBy(value: T[], transform: (it: T) => number): T[] { return value.toSorted((a, b) => transform(a) - transform(b)); }