-
Notifications
You must be signed in to change notification settings - Fork 0
filename
Subhajit Sahu edited this page Jul 25, 2022
·
4 revisions
Get file name without extension.
Similar: filename, symbolname, keywordname.
filename(pth)
// pth: file path
const xpath = require('extra-path');
xpath.filename("/home/user/open+source.txt");
// → 'open+source'
xpath.filename("/home/user/closedSource.key");
// → 'closedSource'
xpath.filename("/home/user/copyleft_licenses.tar.gz");
// → 'copyleft_licenses.tar'