Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

utils.ts

8 lines224 Bytes

1const fieldPathCollator = new Intl.Collator(undefined, {
2 numeric: true,
3 sensitivity: 'base',
4})
5​
6export function compareFieldPaths(left: string, right: string): number {
7 return fieldPathCollator.compare(left, right)
8}