Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

5 lines
150 B
TypeScript
Raw Permalink Normal View History

2025-12-12 14:26:25 +09:00
export const sortAlphabetical =
<K extends string>(key: K) =>
<T extends { [key in K]: string }>(a: T, b: T) =>
a[key].localeCompare(b[key]);