Skip to main content

removeExt()

const removeExt: (filename, ext) => string

Removes the specific ext extension from filename, if it has it. Otherwise it leaves it as is. As in all upath functions, it be .ext or ext.

Parameters

ParameterTypeDescription

filename

string

string filename to remove extension to

ext

string

string extension to remove

Returns

string