
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
Basic utility methods for transforming and handling file paths. As with node.js, the file system is not consulted to check whether paths are valid.
Install the module with: npm install node-name
Require it:
var name = require('node-name');
Test it:
console.log(name.basename('foo/bar/baz.quux'));
// => baz
name.dir('path/to/transform.txt');
name.file('path/to/transform.txt');
name.filename('path/to/transform.txt');
name.base('path/to/transform.txt');
name.basename('path/to/transform.txt');
name.ext('path/to/transform.txt');
After I started paying attention to how the Node.js path module handles and transforms file paths (path.basename, path.extname, etc.), I was surprised at the results. Not that I should have been, but when utilities like this are so easy to use, I sometimes forget that I still need to look at what's happening under the hood.
Currently, this module just makes it a tiny bit more convenient to see how paths are transformed by these utilities. But over time my goal is to build out this library to include more robust utilities.
Contributions and feedback are welcome!
Copyright (c) 2013 Jon Schlinkert Licensed under the MIT License (MIT)
FAQs
Basic utility methods for transforming and handling file paths.
The npm package node-name receives a total of 176 weekly downloads. As such, node-name popularity was classified as not popular.
We found that node-name demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.