Useful additions to inbuilt path module.
๐ฆ Node.js,
๐ Web,
๐ Files,
๐ฐ Docs,
๐ Wiki.
This package is available in Node.js and Web formats. To use it on the web,
simply use the extra_path
global variable after loading with a <script>
tag from the jsDelivr CDN.
Stability: Experimental.
const xpath = require('extra-path');
function main() {
xpath.filename('/home/user/file+name.txt');
// โ 'file+name'
xpath.symbolname('/home/user/file+name.txt');
// โ 'file_name'
xpath.keywordname('/home/user/file+name.txt');
// โ 'file-name'
}
main();
Property | Description |
---|---|
filename | Get file name without extension. |
symbolname | Get symbol name for file. |
keywordname | Get keyword name for file. |