Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

std/path/posix/is_absolute.ts

Deno standard library
Go to Latest
File
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.// This module is browser compatible.
import { assertPath } from "../_common/assert_path.ts";import { isPosixPathSeparator } from "./_util.ts";
/** * Verifies whether provided path is absolute * @param path to be verified as absolute */export function isAbsolute(path: string): boolean { assertPath(path); return path.length > 0 && isPosixPathSeparator(path.charCodeAt(0));}