basename

export function basename(path: string, ext?: string): string;
export function basename(path: string, ext?: string): string;
Alternative to Node's path.basename, removing query string after the extension if it exists.
Returns
Basename of the path
NameTypeOptionalDescription
pathstringNoPath to get the basename of
extstringYesFile extension to remove