{"_id":"is-path-inside","_rev":"96350","name":"is-path-inside","description":"Check if a path is inside another path","dist-tags":{"latest":"4.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2021-06-03T10:32:12.000Z","created":"2014-06-20T22:19:18.874Z","4.0.0":"2021-05-03T12:59:34.548Z","3.0.3":"2021-03-08T06:08:34.854Z","3.0.2":"2019-09-30T09:26:46.419Z","3.0.1":"2019-07-05T16:04:02.853Z","3.0.0":"2019-07-05T04:31:59.865Z","2.1.0":"2019-04-15T16:33:19.419Z","2.0.0":"2018-03-22T15:30:24.655Z","1.0.1":"2017-11-30T10:34:52.892Z","1.0.0":"2014-08-14T09:47:01.189Z","0.1.0":"2014-06-20T22:19:18.874Z"},"users":{"recursion_excursion":true,"rocket0191":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-path-inside.git"},"versions":{"4.0.0":{"name":"is-path-inside","version":"4.0.0","description":"Check if a path is inside another path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-path-inside.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["path","inside","folder","directory","file","resolve"],"devDependencies":{"ava":"^3.15.0","tsd":"^0.14.0","xo":"^0.39.1"},"gitHead":"6dd8543476cd100488a3cd83887970a8a03504e7","bugs":{"url":"https://github.com/sindresorhus/is-path-inside/issues"},"homepage":"https://github.com/sindresorhus/is-path-inside#readme","_id":"is-path-inside@4.0.0","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"shasum":"805aeb62c47c1b12fc3fd13bfb3ed1e7430071db","size":1998,"noattachment":false,"key":"/is-path-inside/-/is-path-inside-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-path-inside/download/is-path-inside-4.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-path-inside_4.0.0_1620046774399_0.29166481692476043"},"_hasShrinkwrap":false,"publish_time":1620046774548,"_cnpm_publish_time":1620046774548},"3.0.3":{"name":"is-path-inside","version":"3.0.3","description":"Check if a path is inside another path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-path-inside.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["path","inside","folder","directory","dir","file","resolve"],"devDependencies":{"ava":"^2.1.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"c39df5738b543ec2afdc31cb0e825b98514cee62","bugs":{"url":"https://github.com/sindresorhus/is-path-inside/issues"},"homepage":"https://github.com/sindresorhus/is-path-inside#readme","_id":"is-path-inside@3.0.3","_nodeVersion":"14.16.0","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"d231362e53a07ff2b0e0ea7fed049161ffd16283","size":1996,"noattachment":false,"key":"/is-path-inside/-/is-path-inside-3.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-path-inside/download/is-path-inside-3.0.3.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-path-inside_3.0.3_1615183714667_0.6057169365626403"},"_hasShrinkwrap":false,"publish_time":1615183714854,"_cnpm_publish_time":1615183714854},"3.0.2":{"name":"is-path-inside","version":"3.0.2","description":"Check if a path is inside another path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-path-inside.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["path","inside","folder","directory","dir","file","resolve"],"devDependencies":{"ava":"^2.1.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"e245fb401b668deb5cb1061ed1c7e68ab06cccbe","bugs":{"url":"https://github.com/sindresorhus/is-path-inside/issues"},"homepage":"https://github.com/sindresorhus/is-path-inside#readme","_id":"is-path-inside@3.0.2","_nodeVersion":"10.16.3","_npmVersion":"6.11.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"f5220fc82a3e233757291dddc9c5877f2a1f3017","size":2079,"noattachment":false,"key":"/is-path-inside/-/is-path-inside-3.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-path-inside/download/is-path-inside-3.0.2.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-path-inside_3.0.2_1569835606260_0.5815231309008762"},"_hasShrinkwrap":false,"publish_time":1569835606419,"_cnpm_publish_time":1569835606419},"3.0.1":{"name":"is-path-inside","version":"3.0.1","description":"Check if a path is inside another path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-path-inside.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["path","inside","folder","directory","dir","file","resolve"],"devDependencies":{"ava":"^2.1.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"cc9e12dcb78ec83e6769916f9e3347aea197378d","bugs":{"url":"https://github.com/sindresorhus/is-path-inside/issues"},"homepage":"https://github.com/sindresorhus/is-path-inside#readme","_id":"is-path-inside@3.0.1","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"7417049ed551d053ab82bba3fdd6baa6b3a81e89","size":1941,"noattachment":false,"key":"/is-path-inside/-/is-path-inside-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-path-inside/download/is-path-inside-3.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-path-inside_3.0.1_1562342642731_0.42618042099088504"},"_hasShrinkwrap":false,"publish_time":1562342642853,"_cnpm_publish_time":1562342642853},"3.0.0":{"name":"is-path-inside","version":"3.0.0","description":"Check if a path is inside another path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-path-inside.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["path","inside","folder","directory","dir","file","resolve"],"devDependencies":{"ava":"^2.1.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"d07f9e1cc1deb228c4f94a1ae9188c76523d4b13","bugs":{"url":"https://github.com/sindresorhus/is-path-inside/issues"},"homepage":"https://github.com/sindresorhus/is-path-inside#readme","_id":"is-path-inside@3.0.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"1b157644770a6200864a701b4447cdae60f9bc8e","size":1927,"noattachment":false,"key":"/is-path-inside/-/is-path-inside-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-path-inside/download/is-path-inside-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-path-inside_3.0.0_1562301119737_0.7632901539665864"},"_hasShrinkwrap":false,"publish_time":1562301119865,"_cnpm_publish_time":1562301119865},"2.1.0":{"name":"is-path-inside","version":"2.1.0","description":"Check if a path is inside another path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-path-inside.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd"},"keywords":["path","inside","folder","directory","dir","file","resolve"],"dependencies":{"path-is-inside":"^1.0.2"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"2c712b73250b94cec65b8c815b687a0d115e5724","bugs":{"url":"https://github.com/sindresorhus/is-path-inside/issues"},"homepage":"https://github.com/sindresorhus/is-path-inside#readme","_id":"is-path-inside@2.1.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"7c9810587d659a40d27bcdb4d5616eab059494b2","size":1569,"noattachment":false,"key":"/is-path-inside/-/is-path-inside-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-path-inside/download/is-path-inside-2.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-path-inside_2.1.0_1555345999308_0.36274390118968913"},"_hasShrinkwrap":false,"publish_time":1555345999419,"_cnpm_publish_time":1555345999419},"2.0.0":{"name":"is-path-inside","version":"2.0.0","description":"Check if a path is inside another path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-path-inside.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["path","inside","folder","directory","dir","file","resolve"],"dependencies":{"path-is-inside":"^1.0.2"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"27b2c70c0f9df420cb13af6cc2f7807344a5d9b6","bugs":{"url":"https://github.com/sindresorhus/is-path-inside/issues"},"homepage":"https://github.com/sindresorhus/is-path-inside#readme","_id":"is-path-inside@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"28f249020fe6906671fe31a76118f2cd490441fd","size":1457,"noattachment":false,"key":"/is-path-inside/-/is-path-inside-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-path-inside/download/is-path-inside-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-path-inside_2.0.0_1521732624517_0.20433325811345182"},"_hasShrinkwrap":false,"publish_time":1521732624655,"_cnpm_publish_time":1521732624655},"1.0.1":{"name":"is-path-inside","version":"1.0.1","description":"Check if a path is inside another path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-path-inside.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["path","inside","folder","directory","dir","file","resolve"],"dependencies":{"path-is-inside":"^1.0.1"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"7f08550845a34a9be18f5422f31da0c83b5a50b9","bugs":{"url":"https://github.com/sindresorhus/is-path-inside/issues"},"homepage":"https://github.com/sindresorhus/is-path-inside#readme","_id":"is-path-inside@1.0.1","_shasum":"8ef5b7de50437a3fdca6b4e865ef7aa55cb48036","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"8ef5b7de50437a3fdca6b4e865ef7aa55cb48036","size":1479,"noattachment":false,"key":"/is-path-inside/-/is-path-inside-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-path-inside/download/is-path-inside-1.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-path-inside-1.0.1.tgz_1512038091165_0.6817436330020428"},"directories":{},"publish_time":1512038092892,"_hasShrinkwrap":false,"_cnpm_publish_time":1512038092892},"1.0.0":{"name":"is-path-inside","version":"1.0.0","description":"Check if a path is inside another path","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/is-path-inside"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["path","inside","folder","directory","dir","file","resolve"],"dependencies":{"path-is-inside":"^1.0.1"},"devDependencies":{"mocha":"*"},"gitHead":"b507035b66a539b7c12ba8b6b486377aa02aef9f","bugs":{"url":"https://github.com/sindresorhus/is-path-inside/issues"},"homepage":"https://github.com/sindresorhus/is-path-inside","_id":"is-path-inside@1.0.0","_shasum":"fc06e5a1683fbda13de667aff717bbc10a48f37f","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"fc06e5a1683fbda13de667aff717bbc10a48f37f","size":783,"noattachment":false,"key":"/is-path-inside/-/is-path-inside-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-path-inside/download/is-path-inside-1.0.0.tgz"},"directories":{},"publish_time":1408009621189,"_cnpm_publish_time":1408009621189,"_hasShrinkwrap":false},"0.1.0":{"name":"is-path-inside","version":"0.1.0","description":"Check if a path is inside another path","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/is-path-inside"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["path","inside","folder","directory","dir","file","resolve"],"dependencies":{"path-is-inside":"^1.0.1"},"devDependencies":{"mocha":"*"},"bugs":{"url":"https://github.com/sindresorhus/is-path-inside/issues"},"homepage":"https://github.com/sindresorhus/is-path-inside","_id":"is-path-inside@0.1.0","_shasum":"80a5625e69ec88acd0ebe7bc06ecb89a1438de94","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"80a5625e69ec88acd0ebe7bc06ecb89a1438de94","size":781,"noattachment":false,"key":"/is-path-inside/-/is-path-inside-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-path-inside/download/is-path-inside-0.1.0.tgz"},"directories":{},"publish_time":1403302758874,"_cnpm_publish_time":1403302758874,"_hasShrinkwrap":false}},"readme":"# is-path-inside\n\n> Check if a path is inside another path\n\n## Install\n\n```\n$ npm install is-path-inside\n```\n\n## Usage\n\n```js\nimport isPathInside from 'is-path-inside';\n\nisPathInside('a/b/c', 'a/b');\n//=> true\n\nisPathInside('a/b/c', 'x/y');\n//=> false\n\nisPathInside('a/b/c', 'a/b/c');\n//=> false\n\nisPathInside('/Users/sindresorhus/dev/unicorn', '/Users/sindresorhus');\n//=> true\n```\n\n## API\n\n### isPathInside(childPath, parentPath)\n\nNote that relative paths are resolved against `process.cwd()` to make them absolute.\n\n**Important:** This package is meant for use with path manipulation. It does not check if the paths exist nor does it resolve symlinks. You should not use this as a security mechanism to guard against access to certain places on the file system.\n\n#### childPath\n\nType: `string`\n\nThe path that should be inside `parentPath`.\n\n#### parentPath\n\nType: `string`\n\nThe path that should contain `childPath`.\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-is-path-inside?utm_source=npm-is-path-inside&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","_attachments":{},"homepage":"https://github.com/sindresorhus/is-path-inside#readme","bugs":{"url":"https://github.com/sindresorhus/is-path-inside/issues"},"license":"MIT"}