{"name":"commondir","version":"1.0.1","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","engine":{"node":">=0.4"},"gitHead":"57797b60db24c60029f7593995241749b1704902","bugs":{"url":"https://github.com/substack/node-commondir/issues"},"homepage":"https://github.com/substack/node-commondir","_id":"commondir@1.0.1","_shasum":"ddd800da0c66127393cca5950ea968a3aaf1253b","_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":"ddd800da0c66127393cca5950ea968a3aaf1253b","tarball":"http://registry-npm.ywwl.com/commondir/download/commondir-1.0.1.tgz","integrity":"sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuxxJ5D2cuEKuK80Xm6k1ghbRbUddLlqGaFIRyFEiMQQIgJAWY7OC3H5HmJmGMsjqHyJBehITSaUysHmCDgJCdjvc="}],"size":2267,"noattachment":false,"key":"/commondir/-/commondir-1.0.1.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":1426292101725,"_cnpm_publish_time":1426292101725,"dist-tags":{"latest":"1.0.1"}}