{"_id":"@aduth/is-dependency","_rev":"1-a252492a3a804f6619c32092d5bb9f4b","name":"@aduth/is-dependency","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@aduth/is-dependency","version":"1.0.0","description":"Quickly determine if the given package(s) are dependencies in the current directory","main":"index.js","scripts":{"clean:types":"rm -f index.d.ts","prebuild:types":"npm run clean:types","build:types":"tsc -p tsconfig.decl.json","build":"npm run build:types","test:lint":"eslint .","test:typecheck":"tsc","test":"npm run test:lint && npm run test:typecheck","prepublishOnly":"npm test"},"keywords":["installed","dependencies","dependency"],"repository":{"type":"git","url":"git+https://github.com/aduth/is-dependency.git"},"bugs":{"url":"https://github.com/aduth/is-dependency/issues"},"author":{"name":"Andrew Duthie","email":"andrew@andrewduthie.com","url":"https://andrewduthie.com"},"license":"MIT","devDependencies":{"@aduth/eslint-config":"^4.3.0","@types/node":"^17.0.0","eslint":"^8.5.0","prettier":"^2.5.1","typescript":"^4.5.4"},"publishConfig":{"access":"public"},"types":"./index.d.ts","homepage":"https://github.com/aduth/is-dependency#readme","_id":"@aduth/is-dependency@1.0.0","_nodeVersion":"17.2.0","_npmVersion":"8.3.0","dist":{"integrity":"sha512-1CJwTd6B6XDb6HETcHMwjRmQLQi2FgjM1rYUO6wf1yizKVPC9V66vmvVCtgePMzWmhsLqdhOPLWt+fNvG46FoA==","shasum":"1e2efebae56fd8c1a29bdcd8141e63c185c3bb67","tarball":"https://registry.npmjs.org/@aduth/is-dependency/-/is-dependency-1.0.0.tgz","fileCount":5,"unpackedSize":5437,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhviIeCRA9TVsSAnZWagAA2LAQAJzsa6rPA3XQIOW/IYam\nS/M8uSDoBxiaYLMTDGRMNLnRlnDNrfb5I0o0EJ6tSbEj4B9WtGmW2ZBw3lOz\n9WVcIvgpioqU+cSLpa+tS95kwQYZDNuEdv+ksH0iES7hgjUFQUTn5VlmZr3Z\nKrspc/VR80pr99RiEqMVzag+GT2YuKGjbvr21Ig7rvMcKiaTYmyi1mq/mE0C\nx/SYDxMxsdrW6ljcXiamnlcbNg0QluxG57N3oXSWCKU/BotYncnZZLJwnc1w\nhzMwfEYrf8a/bK8H9Vpy6qsQgWTyDjm2ZKXAYCn0Tm57eJgeShpJao0zdMcR\n3/9cZbrW4+ywwps0cW1X2AFaNd/+NpcMZtwIZe+641Eeidf1YhlumnzYuuev\na9G4/ptIAtq51Q0eXy/14+vbmZwB0huK2T/VuruJHoD/miIMQk8Ag/fmjZIY\nwgjJtJ8jUTDfXqRIXHr84x9isdgERho1cj1ev21jIEJXPkJy/X/qNp20dafn\nl15rM6QrXWaDKwoZDP66Ui8vJ8NnZKGiUr3SGi68njWMgnncjo07wMAsqSmD\nEQc3mx5jue15iLGN8qzMACDhVDsz/enQ2pC6WDbI6fUIQ344pt/sPbR4Kmix\nzi5agdFsF2HH9yX8aazhP0mrTSTJAQjoZWDdq9QqNot5vi7wxCq958Gqt/Zy\n5E91\r\n=46c0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDU2qOjedCTlXHfyFAeMtiw/eWMBjcyyVQq2vAvCdnKWgIhANNCGN5tnd2B96b779vRskZcIo+xUfStF+GWJh6BhHJD"}]},"_npmUser":{"name":"aduth","email":"andrew@andrewduthie.com"},"directories":{},"maintainers":[{"name":"aduth","email":"andrew@andrewduthie.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-dependency_1.0.0_1639850525892_0.8452073433756879"},"_hasShrinkwrap":false}},"time":{"created":"2021-12-18T18:02:05.821Z","1.0.0":"2021-12-18T18:02:06.025Z","modified":"2022-04-04T11:38:09.164Z"},"maintainers":[{"name":"aduth","email":"andrew@andrewduthie.com"}],"description":"Quickly determine if the given package(s) are dependencies in the current directory","homepage":"https://github.com/aduth/is-dependency#readme","keywords":["installed","dependencies","dependency"],"repository":{"type":"git","url":"git+https://github.com/aduth/is-dependency.git"},"author":{"name":"Andrew Duthie","email":"andrew@andrewduthie.com","url":"https://andrewduthie.com"},"bugs":{"url":"https://github.com/aduth/is-dependency/issues"},"license":"MIT","readme":"# `@aduth/is-dependency`\n\nA utility to quickly determine if the given package(s) are dependencies within the current working directory.\n\nThis implementation optimizes speed over accuracy, synchronously returning true if the package is defined as a dependency in the current directory's `package.json`, regardless of whether it's actually installed.\n\n## Installation\n\nInstall using npm:\n\n```\nnpm install @aduth/is-dependency\n```\n\n## Usage\n\nPass a name or array of names of dependencies and receive a boolean value in return.\n\n```js\nimport { isDependency } from '@aduth/is-dependency';\n\nisDependency('@aduth/is-dependency');\n// true\n```\n\n## API\n\n### `isDependency`\n\nReturns true if the given package name or array of names are all defined as dependency's in the current working directory's relative `package.json`.\n\nOptionally, pass an object of options to control the behavior.\n\n```ts\nexport type Options = {\n\t/**\n\t * Fields to check in `package.json`.\n\t */\n\tfields: string[];\n};\n\nexport function isDependency(\n\tnameOrNames: string | string[],\n\toptions?: Partial<Options> | undefined\n): boolean;\n```\n\n## License\n\nCopyright 2021 Andrew Duthie\n\nReleased under the [MIT License](https://github.com/aduth/is-dependency/tree/master/LICENSE.md).\n","readmeFilename":"README.md"}