{"name":"is-subdir","version":"1.2.0","description":"Return whether a directory is a subdirectory of another directory","main":"index.js","scripts":{"test":"node test","md":"mos"},"engines":{"node":">=4"},"repository":{"type":"git","url":"https://github.com/zkochan/packages/tree/master/is-subdir"},"keywords":["subdirectory","subfolder","subpath","directory","folder","path"],"author":{"name":"Zoltan Kochan","url":"https://www.kochan.io"},"mos":{"plugins":["readme"],"installation":{"useShortAlias":true}},"license":"MIT","homepage":"https://github.com/zkochan/packages/tree/master/is-subdir#readme","devDependencies":{"is-windows":"1.0.2","mos":"2.0.0-alpha.3","mos-plugin-readme":"^1.0.4","tape":"^5.0.1"},"dependencies":{"better-path-resolve":"1.0.0"},"_id":"is-subdir@1.2.0","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==","shasum":"b791cd28fab5202e91a08280d51d9d7254fd20d4","tarball":"http://registry-npm.ywwl.com/is-subdir/download/is-subdir-1.2.0.tgz","fileCount":5,"unpackedSize":3859,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9JleCRA9TVsSAnZWagAAqXUP/3na2XQMoJi+kbXmjQd9\ncSiPcrpisZ2KbwvUSgP316TkFZkuVaw8OgTktRJIuxLP3XtOiyZ9z11e8R7Y\nXCc2PHk48e1YI8dAdCbbBfRciPUe/JbQGkwsTeXCh29pMA7k2DFI8f3EaJcU\ncx4H89MWwuZJXNv+BYGRlY+UN1mHariqSOPg7VHIEgw7Lt8ri0JQWuXfHjxD\nQrQ3dSLysgO6HsBVPGDV7VL2NzS1N6XjVqygsKX+9zp/HdMJGT5FmWtWSzvL\nKLPg9oYKhwfjpnERB27ag8LD617EHJNrPyEl+EWpQnjvphqA8I9voaueiX+B\nqYYZpWWMulMwJcq/mYZgBcPiqQhQkiGXV7FNjiOb7aFrh2e4ZKmOHzXxEkmX\n7WpLF6wwgOaqOAaW0V6qsy3EuYr8lYzqR+b1MA8MKQ+J7vN1OODzpNeTVgcz\nxIuVRLejrcfcoejfGPX6ITHh5TsTijK/pl5s2L5abQyIw/XV761NDVq1HLqn\noXBh9e+l+gf5w8uptDrLaQs5CDwBxEC6+0Z7GpK3lx6lFUHhQ8Hr685g8EzL\n8gRdeO/bV3lUw2sPugONZ01D5UZql+jLyjHVDTrfj74zUnBlkeqmfNvU+muw\nyvIocR8eBUDdkDzTiDbTYh1BER3W1oE8trSR2351andw6OI3O2+CAA2ZRjkc\nhO2g\r\n=rDZw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdOmjLCk7GwJ0/CIxDQ8zyydaOXBQ+I2BSrfh1iPcYNQIgJcQA4pQ8Mx3TMk5frUcse3skAD9lgSihTSN6YwSyBgE="}],"size":1960,"noattachment":false,"key":"/is-subdir/-/is-subdir-1.2.0.tgz"},"_npmUser":{"name":"zkochan","email":"z@kochan.io"},"directories":{},"maintainers":[{"name":"zkochan","email":"z@kochan.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-subdir_1.2.0_1609865565352_0.3023555870075294"},"_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":1609865565485,"_cnpm_publish_time":1609865565485,"dist-tags":{"latest":"2.0.1","next":"1.1.1"}}