Home

Awesome

path2

Modular and extended version of Node's path package

Works exactly same as Node's path, with following improvements:

One additional function, not present in native path, is provided:

path.common(path1[, ...pathn])

Resolves common path for given path arguments:

path.common('/lorem/ipsum/foo/bar', '/lorem/ipsum/raz/dwa',
  '/lorem/elo/foo/bar'); //  => '/lorem'

path.common is proposed to be included in native path

Installation

NPM

In your project path:

$ npm install path2
Browser

You can easily bundle path2 for browser with any CJS bundler, e.g. modules-webmake

Tests Build Status

$ npm test