deno.land / std@0.224.0 / path / is_absolute.ts

is_absolute.ts
View Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.// This module is browser compatible.
import { isWindows } from "./_os.ts";import { isAbsolute as posixIsAbsolute } from "./posix/is_absolute.ts";import { isAbsolute as windowsIsAbsolute } from "./windows/is_absolute.ts";
/** * Verifies whether provided path is absolute * @param path to be verified as absolute */export function isAbsolute(path: string): boolean { return isWindows ? windowsIsAbsolute(path) : posixIsAbsolute(path);}
std

Version Info

Tagged at
6 months ago