Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

extra-path

nodef205BSD-3-Clause1.2.1TypeScript support: included

Useful additions to inbuilt path module.

extra, path, basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, parse, posix, relative, resolve, sep, toNamespacedPath, win32, FormatInputPathObject, ParsedPath, PlatformPath, filename, keywordname, symbolname

readme

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();


Index

Property Description
filename Get file name without extension.
symbolname Get symbol name for file.
keywordname Get keyword name for file.



ORG DOI Coverage Status Test Coverage Maintainability