Node.js implementation of Ruby's Pathname.
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
- Node.js >= 4.0.0
The code is licensed under the MIT License.
See LICENSE
file for details.