Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/esm/path/util.js>isAbsolute

A JavaScript extension package for building strong and modern applications.
Latest
function isAbsolute
import { isAbsolute } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/path/util.js";

Checks if the given path is an absolute path.

Examples

Example 1

import { isAbsolute } from "@ayonli/jsext/path";

console.assert(isAbsolute("/usr/bin"));
console.assert(isAbsolute("C:\\Windows\\System32"));
console.assert(isAbsolute("http://example.com"));
console.assert(isAbsolute("file:///C:/Windows/System32"));
console.assert(isAbsolute("file://localhost/C:/Windows/System32?foo=bar#baz"));