This release is 16 versions behind 1.1.4 — the latest version of @std/path. Jump to latest
Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
Works with
•JSR Score94%•This package works with Cloudflare Workers, Deno, Browsers


Downloads81,165/wk
•Published2 years ago (0.225.1)
Utilities for working with file system paths
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // This module is browser compatible. import { isWindows } from "./_os.ts"; import { dirname as posixDirname } from "./posix/dirname.ts"; import { dirname as windowsDirname } from "./windows/dirname.ts"; /** * Return the directory path of a `path`. * @param path - path to extract the directory from. */ export function dirname(path: string): string { return isWindows ? windowsDirname(path) : posixDirname(path); }