Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/dxx/src/lib/$shared.ts>traversal

🚀 (Deno) enhanced executor
Latest
function traversal
import { traversal } from "https://deno.land/x/dxx@rf/src/lib/$shared.ts";

Determine the traversal path to goal from base.

  • Returned path will be relative to base iff goal shares a common origin/prefix with base, o/w it will be an absolute path
  • Relative goal or base paths are evaluated as relative to the Deno.cwd() directory

Parameters

goal: string | URL

• target path

optional
base: string | URL = [UNSUPPORTED]

• starting path ~ defaults to $path.toFileUrl(Deno.cwd()+$path.SEP); note: per usual relative URL rules, if base does not have a trailing separator, determination of path is relative the the parent of base