MCPcopy Create free account
hub / github.com/tiann/hapi / workspaceRootsEqual

Function workspaceRootsEqual

cli/src/api/apiMachine.ts:59–67  ·  view source on GitHub ↗
(left?: string[], right?: string[])

Source from the content-addressed store, hash-verified

57}
58
59function workspaceRootsEqual(left?: string[], right?: string[]): boolean {
60 const normalizedLeft = left ?? []
61 const normalizedRight = right ?? []
62 if (normalizedLeft.length !== normalizedRight.length) {
63 return false
64 }
65
66 return normalizedLeft.every((value, index) => value === normalizedRight[index])
67}
68
69function formatWorkspaceRoots(paths?: string[]): string {
70 return paths?.length ? paths.join(', ') : '(none)'

Callers 1

connectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected