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

Function pathIsRelative

test/fixtures/snapshot/typescript.js:7600–7602  ·  view source on GitHub ↗

* Determines whether a path starts with a relative path component (i.e. `.` or `..`).

(path)

Source from the content-addressed store, hash-verified

7598 * Determines whether a path starts with a relative path component (i.e. `.` or `..`).
7599 */
7600 function pathIsRelative(path) {
7601 return /^\.\.?($|[\\/])/.test(path);
7602 }
7603 ts.pathIsRelative = pathIsRelative;
7604 /**
7605 * Determines whether a path is neither relative nor absolute, e.g. "path/to/file".

Callers 2

pathIsBareSpecifierFunction · 0.85

Calls 1

testMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…