Socket
Book a DemoInstallSign in
Socket

node-name

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-name

Basic utility methods for transforming and handling file paths.

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
237
62.33%
Maintainers
1
Weekly downloads
 
Created
Source

node-name

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.

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!

Getting Started

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

Author

  • Jon Schlinkert

License

Copyright (c) 2013 Jon Schlinkert Licensed under the MIT License (MIT)

Keywords

path

FAQs

Package last updated on 10 Sep 2013

Did you know?

Socket

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.

Install

Related posts