filename - nodef/extra-path GitHub Wiki

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'

References