trimExt()
consttrimExt: (filename,ignoreExts?,maxSize?) =>string=upath.trimExt
Trims a filename's extension.
Extensions are considered to be up to maxSize chars long, counting the dot (defaults to 7).
An Array of ignoreExts (eg ['.min']) prevents these from being considered as extension, thus are not trimmed.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
|
string filename to trim it's extension |
|
|
|
array extensions to ignore |
|
|
|
number max length of the extension |
Returns
string