Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/js/util.ts>commonPath

A modern runtime for JavaScript and TypeScript.
Go to Latest
function commonPath
import { commonPath } from "https://deno.land/x/deno@v0.28.0/cli/js/util.ts";

Return the common path shared by the paths.

Parameters

paths: string[]

The set of paths to compare.

optional
sep = [UNSUPPORTED]

An optional separator to use. Defaults to /.

Returns

string