{
  "_id": "path-is-inside",
  "maintainers": [
    {
      "name": "domenic",
      "email": "domenic@domenicdenicola.com"
    }
  ],
  "keywords": [
    "path",
    "directory",
    "folder",
    "inside",
    "relative"
  ],
  "dist-tags": {
    "latest": "1.0.2"
  },
  "author": {
    "name": "Domenic Denicola",
    "email": "d@domenic.me",
    "url": "https://domenic.me"
  },
  "_rev": "15-816a6987e893eb9308a2d240f62eddc1",
  "description": "Tests whether one path is inside another path",
  "readme": "# Is This Path Inside This Other Path?\n\nIt turns out this question isn't trivial to answer using Node's built-in path APIs. A naive `indexOf`-based solution will fail sometimes on Windows, which is case-insensitive (see e.g. [isaacs/npm#4214][]). You might then think to be clever with `path.resolve`, but you have to be careful to account for situations whether the paths have different drive letters, or else you'll cause bugs like [isaacs/npm#4313][]. And let's not even get started on trailing slashes.\n\nThe **path-is-inside** package will give you a robust, cross-platform way of detecting whether a given path is inside another path.\n\n## Usage\n\nPretty simple. First the path being tested; then the potential parent. Like so:\n\n```js\nvar pathIsInside = require(\"path-is-inside\");\n\npathIsInside(\"/x/y/z\", \"/x/y\") // true\npathIsInside(\"/x/y\", \"/x/y/z\") // false\n```\n\nPaths are considered to be inside themselves:\n\n```js\npathIsInside(\"/x/y\", \"/x/y\"); // true\n```\n\n## OS-Specific Behavior\n\nLike Node's built-in path module, path-is-inside treats all file paths on Windows as case-insensitive, whereas it treats all file paths on *-nix operating systems as case-sensitive. Keep this in mind especially when working on a Mac, where, despite Node's defaults, the OS usually treats paths case-insensitively.\n\nIn practice, this means:\n\n```js\n// On Windows\n\npathIsInside(\"C:\\\\X\\\\Y\\\\Z\", \"C:\\\\x\\\\y\") // true\n\n// On *-nix, including Mac OS X\n\npathIsInside(\"/X/Y/Z\", \"/x/y\") // false\n```\n\n[isaacs/npm#4214]: https://github.com/isaacs/npm/pull/4214\n[isaacs/npm#4313]: https://github.com/isaacs/npm/issues/4313\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/domenic/path-is-inside.git"
  },
  "users": {
    "sbruchmann": true,
    "mattmcfarland": true,
    "scottfreecode": true,
    "kontrax": true
  },
  "bugs": {
    "url": "https://github.com/domenic/path-is-inside/issues"
  },
  "license": "(WTFPL OR MIT)",
  "versions": {
    "1.0.0": {
      "name": "path-is-inside",
      "description": "Tests whether one path is inside another path",
      "keywords": [
        "path",
        "directory",
        "folder",
        "inside",
        "relative"
      ],
      "version": "1.0.0",
      "author": {
        "name": "Domenic Denicola",
        "email": "domenic@domenicdenicola.com",
        "url": "http://domenic.me"
      },
      "license": "WTFPL",
      "repository": {
        "type": "git",
        "url": "git://github.com/domenic/path-is-inside.git"
      },
      "bugs": {
        "url": "http://github.com/domenic/path-is-inside/issues"
      },
      "main": "lib/path-is-inside.js",
      "scripts": {
        "test": "mocha",
        "lint": "jshint lib"
      },
      "devDependencies": {
        "jshint": "~2.3.0",
        "mocha": "~1.15.1"
      },
      "homepage": "https://github.com/domenic/path-is-inside",
      "_id": "path-is-inside@1.0.0",
      "dist": {
        "shasum": "8ec1c42a4c1a039e3e75f6e9e6029bd0c699016e",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/path-is-inside/-/path-is-inside-1.0.0.tgz",
        "integrity": "sha512-HsxIvApVQT8ToBkGI87dCEnSso0GSDS5Vt//UPD0HaGXbHz0bKnYePapXg5c/UgtI/lzjrh8jN+j3nATBaZyaQ==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIDNE6yp6wtPmg0kVfJcPfCXH3wvcrXc0yk7rSJf7AXnIAiEA2wMkPnnkzH3TF7Zxb1SD/EqYiX0tgW3Hh+mCQi/sMz8="
          }
        ]
      },
      "_from": ".",
      "_npmVersion": "1.3.15",
      "_npmUser": {
        "name": "domenic",
        "email": "domenic@domenicdenicola.com"
      },
      "maintainers": [
        {
          "name": "domenic",
          "email": "domenic@domenicdenicola.com"
        }
      ]
    },
    "1.0.1": {
      "name": "path-is-inside",
      "description": "Tests whether one path is inside another path",
      "keywords": [
        "path",
        "directory",
        "folder",
        "inside",
        "relative"
      ],
      "version": "1.0.1",
      "author": {
        "name": "Domenic Denicola",
        "email": "domenic@domenicdenicola.com",
        "url": "http://domenic.me"
      },
      "license": "WTFPL",
      "repository": {
        "type": "git",
        "url": "git://github.com/domenic/path-is-inside.git"
      },
      "bugs": {
        "url": "http://github.com/domenic/path-is-inside/issues"
      },
      "main": "lib/path-is-inside.js",
      "scripts": {
        "test": "mocha",
        "lint": "jshint lib"
      },
      "devDependencies": {
        "jshint": "~2.3.0",
        "mocha": "~1.15.1"
      },
      "homepage": "https://github.com/domenic/path-is-inside",
      "_id": "path-is-inside@1.0.1",
      "dist": {
        "shasum": "98d8f1d030bf04bd7aeee4a1ba5485d40318fd89",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/path-is-inside/-/path-is-inside-1.0.1.tgz",
        "integrity": "sha512-SBjqBPwe10u8a3phuxQZMZ68VZ4bHMFV8BsXf37s6+GoIjMcL4KmcOW0VGAyTuekHZdsVM79HgirZANGPFRrvg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQCyniET7QBMZxFGcd8z0Nf2nNlZTPYsJDubBz6cbsa4awIgVhmj1YgXnyUVunln6oeus8P5ZaaN5VOPBNv99YrgxdE="
          }
        ]
      },
      "_from": ".",
      "_npmVersion": "1.3.25",
      "_npmUser": {
        "name": "domenic",
        "email": "domenic@domenicdenicola.com"
      },
      "maintainers": [
        {
          "name": "domenic",
          "email": "domenic@domenicdenicola.com"
        }
      ]
    },
    "1.0.2": {
      "name": "path-is-inside",
      "description": "Tests whether one path is inside another path",
      "keywords": [
        "path",
        "directory",
        "folder",
        "inside",
        "relative"
      ],
      "version": "1.0.2",
      "author": {
        "name": "Domenic Denicola",
        "email": "d@domenic.me",
        "url": "https://domenic.me"
      },
      "license": "(WTFPL OR MIT)",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/domenic/path-is-inside.git"
      },
      "main": "lib/path-is-inside.js",
      "files": [
        "lib"
      ],
      "scripts": {
        "test": "mocha",
        "lint": "jshint lib"
      },
      "devDependencies": {
        "jshint": "~2.3.0",
        "mocha": "~1.15.1"
      },
      "gitHead": "05a9bf7c5e008505539e14e96c4d2fc8b2c6d058",
      "bugs": {
        "url": "https://github.com/domenic/path-is-inside/issues"
      },
      "homepage": "https://github.com/domenic/path-is-inside#readme",
      "_id": "path-is-inside@1.0.2",
      "_shasum": "365417dede44430d1c11af61027facf074bdfc53",
      "_from": ".",
      "_npmVersion": "3.9.5",
      "_nodeVersion": "6.2.2",
      "_npmUser": {
        "name": "domenic",
        "email": "d@domenic.me"
      },
      "dist": {
        "shasum": "365417dede44430d1c11af61027facf074bdfc53",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/path-is-inside/-/path-is-inside-1.0.2.tgz",
        "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIFSQ4bbY2+GoMvuiCM1eK9Hjs+r/ZnPdAJBhyrHB8IBIAiEAyPgBI5mFS5NqVcZWuBQ2IwNemT48GP+B0mtUMhrzVT8="
          }
        ]
      },
      "maintainers": [
        {
          "name": "domenic",
          "email": "domenic@domenicdenicola.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "packages-16-east.internal.npmjs.com",
        "tmp": "tmp/path-is-inside-1.0.2.tgz_1473550509195_0.936812553787604"
      }
    }
  },
  "name": "path-is-inside",
  "time": {
    "modified": "2026-05-16T15:00:24.511Z",
    "created": "2013-12-14T20:22:09.795Z",
    "1.0.0": "2013-12-14T20:22:11.015Z",
    "1.0.1": "2014-03-01T01:23:46.147Z",
    "1.0.2": "2016-09-10T23:35:10.802Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/domenic/path-is-inside#readme"
}