npm.io
1.0.2 • Published 11 years ago

pretty-path

Licence
ISC
Version
1.0.2
Deps
0
Vulns
0
Weekly
0

#pretty-path NPM

Usage

Quite simple as of now. Pass it a filepath and it will try to transform the path into its most syntactically correct form.

var ppath = require('pretty-path')

ppath('x/y/z') // --> ./x/y/z
ppath('x/y/z') // --> /x/y/z
ppath('./////x/y/z') // --> ./x/y/z
ppath('././././x/y/z') // --> ./x/y/z

I realize it is limited in its functionality. Updates will come soon.

Contributions

Any ideas you have - follow them and see them to fruition. Submit a pull request with unit tests and your commit should be merged in no time

Keywords