{"name":"commondir","version":"0.0.1","description":"Compute the closest common parent for file paths","main":"index.js","directories":{"lib":".","example":"example","test":"test"},"dependencies":{},"devDependencies":{"expresso":"0.7.x"},"scripts":{"test":"expresso"},"repository":{"type":"git","url":"git://github.com/substack/node-commondir.git"},"keywords":["common","path","directory","file","parent","root"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"commondir@0.0.1","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.101","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"89f00fdcd51b519c578733fec563e6a6da7f5be2","tarball":"http://registry-npm.ywwl.com/commondir/download/commondir-0.0.1.tgz","integrity":"sha512-Ghe1LmLv3G3c0XJYu+c88MCRIPqWQ67qaqKY1KvuN4uPAjfUj+y4hvcpZ2kCPrjpRNyklW4dpAZZ8a7vOh50tg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0kR6gF3WrJR1d0zNKLn4OpUoh1blTI9GtWBpJUScwwgIhAOLe8c8yMtb9/uDoq296tCa/ozPjSdHcHDrhSnlEPAGR"}],"size":1618,"noattachment":false,"key":"/commondir/-/commondir-0.0.1.tgz"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"readme":"# commondir\n\ncompute the closest common parent directory among an array of directories\n\n# example\n\n``` js\nvar commondir = require('commondir');\nvar dir = commondir(process.argv.slice(2))\nconsole.log(dir);\n```\n\noutput:\n\n```\n$ node dir.js /x/y/z /x/y /x/y/w/q\n/x/y\n$ node ../baz ../../foo/quux ./bizzy\n/foo\n```\n\n# methods\n\n``` js\nvar commondir = require('commondir');\n```\n\n## commondir(absolutePaths)\n\nCompute the closest common parent directory for an array `absolutePaths`.\n\n## commondir(basedir, relativePaths)\n\nCompute the closest common parent directory for an array `relativePaths` which\nwill be resolved for each `dir` in `relativePaths` according to:\n`path.resolve(basedir, dir)`.\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install commondir\n```\n\n# license\n\nMIT\n","publish_time":1321405505980,"_cnpm_publish_time":1321405505980,"dist-tags":{"latest":"1.0.1"}}