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

std/url/dirname.ts

Deno standard library
Go to Latest
import * as mod from "https://deno.land/std@0.208.0/url/dirname.ts";

Functions

Return the directory path of a URL. A directory path is the portion of a URL up to but excluding the final path segment. The final path segment, along with any query or hash values are removed. If there is no path segment then the URL origin is returned. Example, for the URL https://deno.land/std/path/mod.ts, the directory path is https://deno.land/std/path.