mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
c46143f0ac
* chore: update copyright year * fix --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
15 lines
521 B
TypeScript
15 lines
521 B
TypeScript
// 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);
|
|
}
|