{"name":"commondir","version":"0.0.2","description":"compute the closest common parent for file paths","main":"index.js","dependencies":{},"devDependencies":{"tape":"^3.5.0"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"http://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"},"gitHead":"089fac70cf240745ecde80d02e4193080ce4c5a3","bugs":{"url":"https://github.com/substack/node-commondir/issues"},"homepage":"https://github.com/substack/node-commondir","_id":"commondir@0.0.2","_shasum":"c49c8880c6fe96844bb3525dd2e7314050c389ee","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.12.0","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"dist":{"shasum":"c49c8880c6fe96844bb3525dd2e7314050c389ee","tarball":"http://registry-npm.ywwl.com/commondir/download/commondir-0.0.2.tgz","integrity":"sha512-s4oS0jIUZ1t1LJCN7MI2cEDEd25cCSEW0vluKuDEsYcR0KGIiX7HmTtPMbxqGlaqGaihsGlmko1P3vNWzV7cOg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDScXVrN0UmhuUAqKUDxY9RYcu1fZUFLOFbf1uFuUluzAiBPl8ed2Tcsdd06joE9odkzRuNGZ3bwsrggdj+4zNR4BQ=="}],"size":2268,"noattachment":false,"key":"/commondir/-/commondir-0.0.2.tgz"},"directories":{},"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":1426292022196,"_cnpm_publish_time":1426292022196,"dist-tags":{"latest":"1.0.1"}}