lazy-path
Wrapper around the NodeJS path
module that lazily returns the properties of a parsed path. It also normalizes and joins any input by default.
Usage
var Path = var path = Pathconsole // 'path/to'console // 'file.txt'console // 'file'console // '.txt' // The `crumbs` property gives an array of the directies in the pathconsole // ['path', 'to'] // `abs` is a boolean answering whether the path is absolute or notconsole // false // `res` gives the resolved absolute pathconsole // e.g. '/home/user/path/to/other.jpg' // Using the `from` constructor with multiple arguments will join (and normalize) the pathvar another = Pathconsole // 'another/file.txt' // The replacement for Node's `path.relative` is the `to` methodPath // '../another'
Todo
License
Apache-2.0