[F] isPathAbsolute
function isPathAbsolute(path): boolean;Determines whether a path starts with an absolute path component (i.e. /, c:/, file://, etc.).
// POSIXisPathAbsolute("/path/to/file.ext") === true// DOSisPathAbsolute("c:/path/to/file.ext") === true// URLisPathAbsolute("file:///path/to/file.ext") === true// Non-absoluteisPathAbsolute("path/to/file.ext") === falseisPathAbsolute("./path/to/file.ext") === falseParameters
Section titled “Parameters”| Parameter | Type |
|---|---|
path | string |
Returns
Section titled “Returns”boolean