{"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":{"integrity":"sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==","shasum":"805aeb62c47c1b12fc3fd13bfb3ed1e7430071db","tarball":"http://registry-npm.ywwl.com/is-path-inside/download/is-path-inside-4.0.0.tgz","fileCount":5,"unpackedSize":4202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj/O2CRA9TVsSAnZWagAAgsIP/2kmq7WWSD7i11+nl9QQ\no98wKeUe7rW+Xvg0dZWKwmLG+RBw/QStS0rQTDeMDywhrAgVVF7isFLX3jtR\npX5fTrrqsZNVdYaIpBX2RWhtaDhJcaWp9l6VnjL2L1WfIriCnXFZzCz8NnK3\n7s3pbIH4CdwFcpmWaXAx4Dz5U6wudUr6EnMNIJfYP7wLqxfGFu04qtxpp9y1\n/0JOepXnSgHLfYAFGU+9AO7YRgK74fRws31KaIqhznvROXyQN6KgukLWSPvR\n5FnrTc5AWCXCMhaY0ar/rcS6gUYs/MZp0tGQ8v+xn323oiRL6ZNHya4NUVgL\nsf5K/S5cEnhs1VfbJAYRxPYvRitlRVasnkMcBc6d8MZFN+FTaQhNVBXwBGT1\ndN3hp4NFd2bRzIKFhf/XD8U0o/a87ivcrx5jYZjrGPsz8c4oj7DVkDrpk9jv\ni49YHqcfOEdqqRL+tzFrX0ikbbRU4fgOO1tvBjtGnzwnbjyn17jcU/eJp+mb\nIHDS9Z2MUxcYs2+io6VM3gwVPZ8VefTVWQERpm9bEYaar2sEBGMnXXB7beWQ\nGhBmwnVDTdI47Ci6CltSV+n5Wj3hWOqdFgCwkbjY0+U9R/i2sssQdJialvad\nsPhb7OVdgwo8z/YZDWJlC+oEYtUpqNmwCjzpr0aSMKGjba1cqdnhXoprnDTi\nf4GX\r\n=kcPs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFrPemUZLbUQ4ws/qKfUIV7VI/TXfZmhpr7O02f9lbxuAiEAqed4/jBDd4sMVsPOxXypm7HHzhdmHMIpRjMx/QdiNmc="}],"size":1998,"noattachment":false,"key":"/is-path-inside/-/is-path-inside-4.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-path-inside_4.0.0_1620046774399_0.29166481692476043"},"_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","publish_time":1620046774548,"_cnpm_publish_time":1620046774548,"dist-tags":{"latest":"4.0.0"}}