import { isAbsolute, join } from "@std/path"; export function absPath(relpath: string, cwd = Deno.cwd()): string { // TODO(js): homedir check is not cross platform if (isAbsolute(relpath) || relpath[0] === "~") { // Do not join a home dir or absolute path return relpath; } return join(cwd, relpath); }