{"id":16057700,"url":"https://github.com/aduth/is-dependency","last_synced_at":"2026-07-17T16:36:19.332Z","repository":{"id":57095232,"uuid":"439682204","full_name":"aduth/is-dependency","owner":"aduth","description":"Quickly determine if the given package(s) are dependencies in the current directory","archived":false,"fork":false,"pushed_at":"2021-12-18T18:07:32.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-05T15:48:05.997Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aduth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-18T18:02:20.000Z","updated_at":"2021-12-18T18:07:34.000Z","dependencies_parsed_at":"2022-08-22T21:41:18.774Z","dependency_job_id":null,"html_url":"https://github.com/aduth/is-dependency","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aduth/is-dependency","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aduth%2Fis-dependency","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aduth%2Fis-dependency/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aduth%2Fis-dependency/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aduth%2Fis-dependency/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aduth","download_url":"https://codeload.github.com/aduth/is-dependency/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aduth%2Fis-dependency/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35588703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-17T02:00:06.162Z","response_time":116,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T03:04:19.165Z","updated_at":"2026-07-17T16:36:19.256Z","avatar_url":"https://github.com/aduth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"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\u003cOptions\u003e | 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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faduth%2Fis-dependency","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faduth%2Fis-dependency","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faduth%2Fis-dependency/lists"}