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

Function pathIsAbsolute

test/fixtures/snapshot/typescript.js:7593–7595  ·  view source on GitHub ↗

* Determines whether a path starts with an absolute path component (i.e. `/`, `c:/`, `file://`, etc.). * * ```ts * // POSIX * pathIsAbsolute("/path/to/file.ext") === true * // DOS * pathIsAbsolute("c:/path/to/file.ext") === true * // URL * pathIsAbsolute("file

(path)

Source from the content-addressed store, hash-verified

7591 * ```
7592 */
7593 function pathIsAbsolute(path) {
7594 return getEncodedRootLength(path) !== 0;
7595 }
7596 ts.pathIsAbsolute = pathIsAbsolute;
7597 /**
7598 * Determines whether a path starts with a relative path component (i.e. `.` or `..`).

Callers 2

pathIsBareSpecifierFunction · 0.85

Calls 1

getEncodedRootLengthFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…