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

Function pathComponents

test/fixtures/snapshot/typescript.js:7803–7809  ·  view source on GitHub ↗
(path, rootLength)

Source from the content-addressed store, hash-verified

7801 }
7802 ts.getAnyExtensionFromPath = getAnyExtensionFromPath;
7803 function pathComponents(path, rootLength) {
7804 var root = path.substring(0, rootLength);
7805 var rest = path.substring(rootLength).split(ts.directorySeparator);
7806 if (rest.length && !ts.lastOrUndefined(rest))
7807 rest.pop();
7808 return __spreadArray([root], rest, true);
7809 }
7810 /**
7811 * Parse a path into an array containing a root component (at index 0) and zero or more path
7812 * components (at indices > 0). The result is not normalized.

Callers 1

getPathComponentsFunction · 0.85

Calls 2

popMethod · 0.80
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…