close
Skip to main content
This release is versions behind 1.1.5 — the latest version of @std/path.
Works with
This package works with Cloudflare Workers, Deno, Browsers
This package works with Cloudflare Workers
This package works with Deno
This package works with Browsers
JSR Score100%
Downloads81,650/wk
Published3 years ago (0.210.0)

Utilities for working with file system paths

Functions

f
basename(
path: string,
suffix?
): string

Return the last portion of a path. Trailing directory separators are ignored, and optional suffix is removed.

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/path

Import symbol

import * as mod from "@std/path/basename";
or

Import directly with a jsr specifier

import * as mod from "jsr:@std/path/basename";