MCPcopy Create free account
hub / github.com/stackblitz/bolt.new / compareNodes

Function compareNodes

app/components/workbench/FileTree.tsx:403–409  ·  view source on GitHub ↗
(a: Node, b: Node)

Source from the content-addressed store, hash-verified

401}
402
403function compareNodes(a: Node, b: Node): number {
404 if (a.kind !== b.kind) {
405 return a.kind === 'folder' ? -1 : 1;
406 }
407
408 return a.name.localeCompare(b.name, undefined, { numeric: true, sensitivity: 'base' });
409}

Callers 1

sortFileListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected