basename
Import from @varavel/vdl-plugin-sdk/utils/paths.
Returns the last path segment, optionally removing a known extension suffix.
Parameters
| Parameter | Type | Description |
|---|---|---|
path |
string |
Path to inspect. |
extension? |
string |
Optional extension suffix to remove from the result. |
Returns
string
The basename of path.
Example
See
Powered by pathe (MIT License): https://github.com/unjs/pathe