Files
t3code/packages/shared/src/Array.ts
T
Julius Marmingeandcodex 32b749d07e fix(mobile): support Hermes collection sorting
Reuses the focused compatibility approach from closed PR #3923 and covers the remaining hardware-keyboard reverse iteration.

Co-authored-by: codex <[email protected]>
2026-08-14 11:23:26 +02:00

7 lines
153 B
TypeScript

export function copySorted<T>(
values: ReadonlyArray<T>,
compareFn?: (left: T, right: T) => number,
): T[] {
return [...values].sort(compareFn);
}