{"name":"is-subdir","version":"2.0.0","description":"Return whether a directory is a subdirectory of another directory","type":"module","main":"index.js","exports":"./index.js","engines":{"node":">=22.13"},"repository":"https://github.com/zkochan/packages/tree/main/is-subdir","keywords":["subdirectory","subfolder","subpath","directory","folder","path"],"author":{"name":"Zoltan Kochan","url":"https://www.kochan.io"},"license":"MIT","homepage":"https://github.com/zkochan/packages/tree/main/is-subdir#readme","devDependencies":{"is-windows":"^1.0.2"},"dependencies":{"better-path-resolve":"^2.0.0"},"scripts":{"test":"node --test test.js"},"_nodeVersion":"25.6.1","_id":"is-subdir@2.0.0","dist":{"integrity":"sha512-iOXmZKniv4jGFMSYc1K3V/XNl30X1d/m86BKTiDeE2MDULREgBiNpLXsqQKjyETOkWbOyXNQD4M4AZCH51pm7g==","shasum":"5c99942020791a4b3143d2848252eda417da3ffc","tarball":"http://registry-npm.ywwl.com/is-subdir/download/is-subdir-2.0.0.tgz","fileCount":5,"unpackedSize":3598,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCCLvpmCojT7qdPF/f5PBczLRn1vwS3VlXGIeYfekkooQIgPXxTI1T+hNqMGDSX/iZ6r8JsZ+BqnNPozySPCrEiSGY="}],"size":1889,"noattachment":false,"key":"/is-subdir/-/is-subdir-2.0.0.tgz"},"_npmUser":{"name":"zkochan","email":"z@kochan.io"},"directories":{},"maintainers":[{"name":"zkochan","email":"z@kochan.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/is-subdir_2.0.0_1773215554745_0.9605457438816234"},"_hasShrinkwrap":false,"readme":"# is-subdir\n\n> Return whether a directory is a subdirectory of another directory\n\n<!--@shields('npm')-->\n[![npm version](https://img.shields.io/npm/v/is-subdir.svg)](https://www.npmjs.com/package/is-subdir)\n<!--/@-->\n\nCross-platform. Works correctly on Windows, where directory paths can start with disk drive letters in different casings. Like `c:\\foo` and `C:\\foo\\bar`.\n\nReturns `true` when the directories match. The `isSubdir.strict()` variant only returns true if the second parameter is a strict subdir of the first and not the same.\n\n## Installation\n\n```sh\n<npm|yarn|pnpm> add is-subdir\n```\n\n## Usage\n\n```js\n'use strict'\nconst path = require('path')\nconst isSubdir = require('is-subdir')\n\nconsole.log(isSubdir(process.cwd(), path.resolve('node_modules')))\n//> true\nconsole.log(isSubdir.strict('node_modules/tape', '../tape'))\n//> false\n```\n\n## API\n\n### `isSubdir(parentDir, subdir): boolean`\n### `isSubdir.strict(parentDir, subdir): boolean`\n\n## License\n\n[MIT](./LICENSE) © [Zoltan Kochan](https://www.kochan.io)\n","publish_time":1773215554927,"_cnpm_publish_time":1773215554927,"dist-tags":{"latest":"2.0.1","next":"1.1.1"}}