{"id":15586593,"url":"https://github.com/rowanmanning/require-first","last_synced_at":"2026-02-25T15:31:17.319Z","repository":{"id":190450375,"uuid":"670490313","full_name":"rowanmanning/require-first","owner":"rowanmanning","description":"Require and return the first available module.","archived":false,"fork":false,"pushed_at":"2026-02-20T08:29:24.000Z","size":624,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-20T12:38:44.387Z","etag":null,"topics":["library"],"latest_commit_sha":null,"homepage":"","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/rowanmanning.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"docs/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-07-25T07:06:47.000Z","updated_at":"2026-02-20T08:29:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"c8d981b6-c55a-45f0-901f-d74dea3344b1","html_url":"https://github.com/rowanmanning/require-first","commit_stats":{"total_commits":137,"total_committers":4,"mean_commits":34.25,"dds":0.2846715328467153,"last_synced_commit":"1c4ff3d322dbdc0203967970e18c04f4e2d5c18d"},"previous_names":["rowanmanning/require-first"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/rowanmanning/require-first","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rowanmanning%2Frequire-first","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rowanmanning%2Frequire-first/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rowanmanning%2Frequire-first/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rowanmanning%2Frequire-first/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rowanmanning","download_url":"https://codeload.github.com/rowanmanning/require-first/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rowanmanning%2Frequire-first/sbom","scorecard":{"id":785676,"data":{"date":"2025-08-11","repo":{"name":"github.com/rowanmanning/require-first","commit":"8f3404e60865008d07cb7820eaadefdc8b542257"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.6,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/rowanmanning/require-first/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/commit-style.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/rowanmanning/require-first/commit-style.yml/main?enable=pin","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/13 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":2,"reason":"3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/commit-style.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: docs/security.md:1","Info: Found linked content: docs/security.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: docs/security.md:1","Info: Found text in security policy: docs/security.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: all commits (23) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T06:02:32.369Z","repository_id":190450375,"created_at":"2025-08-23T06:02:32.369Z","updated_at":"2025-08-23T06:02:32.369Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29827694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T14:53:59.163Z","status":"ssl_error","status_checked_at":"2026-02-25T14:53:23.002Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["library"],"created_at":"2024-10-02T21:40:39.027Z","updated_at":"2026-02-25T15:31:17.299Z","avatar_url":"https://github.com/rowanmanning.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# @rowanmanning/require-first\n\nRequire and return the first available module.\n\n* [Requirements](#requirements)\n* [Usage](#usage)\n* [Migration](#migration)\n* [Contributing](#contributing)\n* [License](#license)\n\n\n## Requirements\n\nThis library requires the following to run:\n\n  * [Node.js](https://nodejs.org/) 20+\n\n\n## Usage\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\nnpm install @rowanmanning/require-first\n```\n\nLoad the library into your code with a `require` call:\n\n```js\nconst { requireFirst } = require('@rowanmanning/require-first');\n```\n\nRequire modules by passing in an array of paths. The first one that successfully resolves will be returned.\n\n```js\nconst thing = requireFirst(['thing1', './thing2', '~/../example/thing3']);\n```\n\nBy default, an error will be thrown if none of the modules are found. You can change this behaviour to return a default value specified by you:\n\n```js\nconst thing = requireFirst(['thing1', './thing2', '~/../example/thing3'], {\n  example: true\n});\n```\n\n\n## Migration\n\nA new major version of this project is released if breaking changes are introduced. We maintain a [migration guide](docs/migration.md) to help users migrate between these versions.\n\n\n## Contributing\n\n[The contributing guide is available here](docs/contributing.md). All contributors must follow [this library's code of conduct](docs/code_of_conduct.md).\n\n\n## License\n\nLicensed under the [MIT](LICENSE) license.\u003cbr/\u003e\nCopyright \u0026copy; 2019, Rowan Manning\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frowanmanning%2Frequire-first","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frowanmanning%2Frequire-first","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frowanmanning%2Frequire-first/lists"}