isAbsolute

import { isAbsolute } from "jsr:@ende/path/windows/is-absolute";

function

function isAbsolute(path: string): boolean

Verifies whether provided path is absolute.

path: string

The path to verify.

Returns

true if the path is absolute, false otherwise.

Example: Usage

import { isAbsolute } from "@ende/path/windows/is-absolute";
import { assert, assertFalse } from "@ende/assert";

assert(isAbsolute("C:\\foo\\bar"));
assertFalse(isAbsolute("..\\baz"));

Source