npm.io
0.2.0 • Published 9 years ago

node-pathname

Licence
MIT
Version
0.2.0
Deps
1
Vulns
0
Weekly
0
Stars
1

node-pathname

CircleCI

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.

Keywords