Sha256: 898e11c597b549ebe6c6ec3d516c47d3cde009a9919f4d62816fcae1bfff5ace

Contents?: true

Size: 886 Bytes

Versions: 7

Compression:

Stored size: 886 Bytes

Contents

commondir
=========

Compute the closest common parent directory among an array of directories.

example
=======

dir
---

    > var commondir = require('commondir');
    > commondir([ '/x/y/z', '/x/y', '/x/y/w/q' ])
    '/x/y'

base
----

    > var commondir = require('commondir')
    > commondir('/foo/bar', [ '../baz', '../../foo/quux', './bizzy' ])
    '/foo'

methods
=======

var commondir = require('commondir');

commondir(absolutePaths)
------------------------

Compute the closest common parent directory for an array `absolutePaths`.

commondir(basedir, relativePaths)
---------------------------------

Compute the closest common parent directory for an array `relativePaths` which
will be resolved for each `dir` in `relativePaths` according to:
`path.resolve(basedir, dir)`.

installation
============

Using [npm](http://npmjs.org), just do:

    npm install commondir

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
snowball-0.1.22 node_modules/browserify/node_modules/commondir/README.markdown
sprockets-browserify-0.3.0 node_modules/browserify/node_modules/insert-module-globals/node_modules/commondir/README.markdown
sprockets-browserify-0.2.0 node_modules/browserify/node_modules/insert-module-globals/node_modules/commondir/README.markdown
ruby-wisp-source-0.8.0 vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/commondir/README.markdown
ruby-wisp-source-0.7.0 vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/commondir/README.markdown
sprockets-browserify-0.1.2 node_modules/browserify/node_modules/commondir/README.markdown
sprockets-browserify-0.1.0 node_modules/browserify/node_modules/commondir/README.markdown