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

Function getPathComponents

test/fixtures/snapshot/typescript.js:7840–7844  ·  view source on GitHub ↗

* Parse a path into an array containing a root component (at index 0) and zero or more path * components (at indices > 0). The result is not normalized. * If the path is relative, the root component is `""`. * If the path is absolute, the root component includes the first path separat

(path, currentDirectory)

Source from the content-addressed store, hash-verified

7838 * getPathComponents("file://") === ["file://"]
7839 */
7840 function getPathComponents(path, currentDirectory) {
7841 if (currentDirectory === void 0) { currentDirectory = ""; }
7842 path = combinePaths(currentDirectory, path);
7843 return pathComponents(path, getRootLength(path));
7844 }
7845 ts.getPathComponents = getPathComponents;
7846 //// Path Formatting
7847 /**

Callers 5

normalizePathFunction · 0.85
comparePathsWorkerFunction · 0.85
containsPathFunction · 0.85

Calls 3

combinePathsFunction · 0.85
pathComponentsFunction · 0.85
getRootLengthFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…