MCPcopy Create free account
hub / github.com/EvoMap/evolver / canonicalPath

Function canonicalPath

test/paths.test.js:13–20  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

11}
12
13function canonicalPath(value) {
14 const resolved = path.resolve(value);
15 try {
16 return fs.realpathSync.native(resolved);
17 } catch {
18 try { return fs.realpathSync(resolved); } catch { return resolved; }
19 }
20}
21
22function assertPathEqual(actual, expected, message) {
23 assert.equal(canonicalPath(actual), canonicalPath(expected), message);

Callers 2

assertPathEqualFunction · 0.85
paths.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected