MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / normalizeRel

Function normalizeRel

src/resolution/frameworks/terraform.ts:256–259  ·  view source on GitHub ↗

Normalize to the stored path shape: forward slashes, '.' for the root.

(p: string)

Source from the content-addressed store, hash-verified

254
255/** Normalize to the stored path shape: forward slashes, '.' for the root. */
256function normalizeRel(p: string): string {
257 const n = path.normalize(p).replace(/\\/g, '/').replace(/\/+$/, '');
258 return n === '' ? '.' : n;
259}

Callers 1

resolveScopedModuleRefFunction · 0.85

Calls 1

normalizeMethod · 0.80

Tested by

no test coverage detected