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

Function _nodeModulesBoundary

src/gep/paths.js:67–72  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

65 // correctly. For a dev clone, the boundary is null and the walk is
66 // unbounded as before.
67 function _nodeModulesBoundary(dir) {
68 const segments = dir.split(path.sep);
69 const nmIdx = segments.lastIndexOf('node_modules');
70 if (nmIdx <= 0) return null;
71 return segments.slice(0, nmIdx).join(path.sep) || path.sep;
72 }
73
74 function _walkForGit(start) {
75 const stopAt = _nodeModulesBoundary(start);

Callers 2

_walkForGitFunction · 0.85
getRepoRootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected