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