MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / compareFileTreeItems

Function compareFileTreeItems

packages/web/src/features/git/utils.ts:40–45  ·  view source on GitHub ↗
(a: FileTreeItem, b: FileTreeItem)

Source from the content-addressed store, hash-verified

38}
39
40export const compareFileTreeItems = (a: FileTreeItem, b: FileTreeItem): number => {
41 if (a.type !== b.type) {
42 return a.type === 'tree' ? -1 : 1;
43 }
44 return a.name.localeCompare(b.name, undefined, { sensitivity: 'base' });
45}
46
47
48

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected