Mbasename
Bun

method

path.default.PlatformPath.basename

path: string,
suffix?: string
): string;

Return the last portion of a path. Similar to the Unix basename command. Often used to extract the file name from a fully qualified path.

@param path

the path to evaluate.

@param suffix

optionally, an extension to remove from the result.