{
  "_id": "commondir",
  "maintainers": [
    {
      "email": "nopersonsmodules@gmail.com",
      "name": "nopersonsmodules"
    }
  ],
  "keywords": [
    "common",
    "path",
    "directory",
    "file",
    "parent",
    "root"
  ],
  "dist-tags": {
    "latest": "1.0.1"
  },
  "author": {
    "name": "James Halliday",
    "email": "mail@substack.net",
    "url": "http://substack.net"
  },
  "_rev": "21-f122f4eeb7488ae3ddceb90fd0ea72c9",
  "description": "compute the closest common parent for file paths",
  "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",
  "repository": {
    "type": "git",
    "url": "http://github.com/substack/node-commondir.git"
  },
  "users": {
    "wenbing": true,
    "simplyianm": true,
    "erikvold": true,
    "lassevolkmann": true
  },
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/substack/node-commondir/issues"
  },
  "versions": {
    "0.0.0": {
      "name": "commondir",
      "version": "0.0.0",
      "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"
      },
      "_id": "commondir@0.0.0",
      "engines": {
        "node": "*"
      },
      "_engineSupported": true,
      "_npmVersion": "1.0.10",
      "_nodeVersion": "v0.5.0-pre",
      "_defaultsLoaded": true,
      "dist": {
        "shasum": "25fb9c47fa486f81ddf74d6ef061fec59e6260ed",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/commondir/-/commondir-0.0.0.tgz",
        "integrity": "sha512-ULgbbWYRm9O5nFre2+XAXHOFWqXw0BXvE7rpHkdHqtgQgw+6kX0VvRo73LkfOMSQy+FxZJ5LmAR1iRRo5ngdrA==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQD6H4OUt6gEO8aO8nJF3zFPjXlix/WvC2Gx105xY4GD0wIhAPNmQKwolL188CLDPCCk+66yHzXxl09m0WxTygADlOc3"
          }
        ]
      }
    },
    "0.0.1": {
      "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": "https://archive.ito.gov.ir/npm/_packages/commondir/-/commondir-0.0.1.tgz",
        "integrity": "sha512-Ghe1LmLv3G3c0XJYu+c88MCRIPqWQ67qaqKY1KvuN4uPAjfUj+y4hvcpZ2kCPrjpRNyklW4dpAZZ8a7vOh50tg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQC0kR6gF3WrJR1d0zNKLn4OpUoh1blTI9GtWBpJUScwwgIhAOLe8c8yMtb9/uDoq296tCa/ozPjSdHcHDrhSnlEPAGR"
          }
        ]
      },
      "maintainers": [
        {
          "name": "substack",
          "email": "mail@substack.net"
        }
      ]
    },
    "0.0.2": {
      "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": "https://archive.ito.gov.ir/npm/_packages/commondir/-/commondir-0.0.2.tgz",
        "integrity": "sha512-s4oS0jIUZ1t1LJCN7MI2cEDEd25cCSEW0vluKuDEsYcR0KGIiX7HmTtPMbxqGlaqGaihsGlmko1P3vNWzV7cOg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIDScXVrN0UmhuUAqKUDxY9RYcu1fZUFLOFbf1uFuUluzAiBPl8ed2Tcsdd06joE9odkzRuNGZ3bwsrggdj+4zNR4BQ=="
          }
        ]
      },
      "directories": {}
    },
    "1.0.0": {
      "name": "commondir",
      "version": "1.0.0",
      "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": "b0033272cd882d60c05896d290fddfa716931e5d",
      "bugs": {
        "url": "https://github.com/substack/node-commondir/issues"
      },
      "homepage": "https://github.com/substack/node-commondir",
      "_id": "commondir@1.0.0",
      "_shasum": "3e1ca7fbeb5d582e007c1df27ca3e1070511db52",
      "_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": "3e1ca7fbeb5d582e007c1df27ca3e1070511db52",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/commondir/-/commondir-1.0.0.tgz",
        "integrity": "sha512-6xVsLqfsjXeB+Aaw07nVBap+QFdwkGw15aBiz63NQtvxrc8PsEwMV9h/6WYwT+ExI42BuA53ARWY5gWuIPrHZg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQDwCJKH1Cwa3qXMhs3WJFXwuHtP0emjz+1syx+QD6qeZwIgOGFzKfrjmOxjeFSpOM7A6A5NcTl9F+1w/IZQNcdU0iQ="
          }
        ]
      },
      "directories": {}
    },
    "1.0.1": {
      "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": "https://archive.ito.gov.ir/npm/_packages/commondir/-/commondir-1.0.1.tgz",
        "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQDuxxJ5D2cuEKuK80Xm6k1ghbRbUddLlqGaFIRyFEiMQQIgJAWY7OC3H5HmJmGMsjqHyJBehITSaUysHmCDgJCdjvc="
          }
        ]
      },
      "directories": {}
    }
  },
  "name": "commondir",
  "time": {
    "modified": "2026-05-06T08:26:02.237Z",
    "created": "2011-06-28T09:24:34.299Z",
    "0.0.0": "2011-06-28T09:24:34.962Z",
    "0.0.1": "2011-11-16T01:05:05.980Z",
    "0.0.2": "2015-03-14T00:13:42.196Z",
    "1.0.0": "2015-03-14T00:14:04.458Z",
    "1.0.1": "2015-03-14T00:15:01.725Z"
  },
  "readmeFilename": "readme.markdown",
  "homepage": "https://github.com/substack/node-commondir"
}