0.3.0 • Published 8 years ago

path-util v0.3.0

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

path-util NPM version Build Status Dependency Status Coverage percentage

Utility for pathname manipulations

Install

$ npm install --save path-util

Usage

var pathUtil = require('path-util');

var relPath = pathUtil.toRelative('/node/site/../css/style.css', '/node/site');
console.log(relPath);
// => '../css/style.css'

var dir = pathUtil.getDirectory('/node/site/style.css');
console.log(dir);
// => '/node/site'

var ext = pathUtil.getExtension('/node/site/style.css');
console.log(ext);
// => 'css'

// and many more (check the docs or even lib/index.js itself)...

License

MIT © oss6