MCPcopy Index your code
hub / github.com/nodejs/node / countPathComponents

Function countPathComponents

test/fixtures/snapshot/typescript.js:122192–122199  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

122190 return isPathRelativeToParent(nonRelative) || countPathComponents(relativePath) < countPathComponents(nonRelative) ? relativePath : nonRelative;
122191 }
122192 function countPathComponents(path) {
122193 var count = 0;
122194 for (var i = ts.startsWith(path, "./") ? 2 : 0; i < path.length; i++) {
122195 if (path.charCodeAt(i) === 47 /* CharacterCodes.slash */)
122196 count++;
122197 }
122198 return count;
122199 }
122200 moduleSpecifiers_1.countPathComponents = countPathComponents;
122201 function usesJsExtensionOnImports(_a) {
122202 var imports = _a.imports;

Callers 1

getLocalModuleSpecifierFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected