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

x/easyts/path/path.ts>base

js library written with ts, use select and chan like golang in js.
Latest
function base
import { base } from "https://deno.land/x/easyts@0.1.3/path/path.ts";

returns the last element of path. Trailing slashes are removed before extracting the last element.

Parameters

path: string

Returns

string

If the path is empty, Base returns ".". If the path consists entirely of slashes, Base returns "/".