@oazmi/build-tools
Version:
general deno build tool scripts which I practically use in all of my typescript repos
13 lines (12 loc) • 447 B
JavaScript
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { assertPath } from "../_common/assert_path.js";
import { isPosixPathSeparator } from "./_util.js";
/**
* Verifies whether provided path is absolute
* @param path to be verified as absolute
*/
export function isAbsolute(path) {
assertPath(path);
return path.length > 0 && isPosixPathSeparator(path.charCodeAt(0));
}