node-pathname
v0.2.0
Published
Node.js implementation of Ruby's Pathname
Downloads
8
Readme
node-pathname
Node.js implementation of Ruby's Pathname.
Usage
Install with npm
$ npm install --save node-pathname
const Pathname = require('node-pathname')
const NODE_ROOT = new Pathname('.')
let packageJson = NODE_ROOT.join('package.json')
console.log(packageJson.expandPath().toString()) // => /path/to/current/directory/package.json
Requirements
- Node.js >= 4.0.0
License
The code is licensed under the MIT License.
See LICENSE
file for details.