{"id":41412093,"url":"https://github.com/nojacko/node-country-to-iso","last_synced_at":"2026-01-23T13:36:54.784Z","repository":{"id":37965766,"uuid":"335065094","full_name":"nojacko/node-country-to-iso","owner":"nojacko","description":"Convert inconsistent country names and codes into ISO 3166-1 alpha-2.","archived":false,"fork":false,"pushed_at":"2025-07-25T10:09:36.000Z","size":316,"stargazers_count":53,"open_issues_count":0,"forks_count":6,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-12T00:02:59.004Z","etag":null,"topics":["countries","country-codes","iso-3166-1","iso-3166-1-alpha-2","iso-3166-1-alpha-3","nodejs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/country-to-iso","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/nojacko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"nojacko","thanks_dev":null,"custom":null}},"created_at":"2021-02-01T19:46:18.000Z","updated_at":"2025-08-07T04:29:37.000Z","dependencies_parsed_at":"2025-04-09T23:31:56.837Z","dependency_job_id":null,"html_url":"https://github.com/nojacko/node-country-to-iso","commit_stats":{"total_commits":34,"total_committers":5,"mean_commits":6.8,"dds":"0.38235294117647056","last_synced_commit":"fac49238f9297af640a47a4053896a0752cafc49"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/nojacko/node-country-to-iso","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojacko%2Fnode-country-to-iso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojacko%2Fnode-country-to-iso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojacko%2Fnode-country-to-iso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojacko%2Fnode-country-to-iso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nojacko","download_url":"https://codeload.github.com/nojacko/node-country-to-iso/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojacko%2Fnode-country-to-iso/sbom","scorecard":{"id":693290,"data":{"date":"2025-08-11","repo":{"name":"github.com/nojacko/node-country-to-iso","commit":"7a992dea7c97369d22c079f2284f5db20203e426"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Code-Review","score":1,"reason":"Found 4/30 approved changesets -- score normalized to 1","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":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 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":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"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-22T02:52:07.164Z","repository_id":37965766,"created_at":"2025-08-22T02:52:07.164Z","updated_at":"2025-08-22T02:52:07.164Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28693324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T11:01:27.039Z","status":"ssl_error","status_checked_at":"2026-01-23T11:00:26.909Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["countries","country-codes","iso-3166-1","iso-3166-1-alpha-2","iso-3166-1-alpha-3","nodejs"],"created_at":"2026-01-23T13:36:54.671Z","updated_at":"2026-01-23T13:36:54.761Z","avatar_url":"https://github.com/nojacko.png","language":"JavaScript","funding_links":["https://buymeacoffee.com/nojacko"],"categories":[],"sub_categories":[],"readme":"# Country to ISO 3166-1 alpha-2/alpha-3\n\nConvert inconsistent country names and codes into ISO 3166-1 alpha-2 or ISO 3166-1 alpha-3.\n\nThe aim is support English only but some native languages are included.\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoffee.com/nojacko)\n\n## Usage\n\n```bash\nnpm i country-to-iso\n```\n\n```node\nimport { countryToAlpha2, countryToAlpha3 } from \"country-to-iso\";\n// const { countryToAlpha2, countryToAlpha3 } = require(\"country-to-iso\");\n\n// countryToAlpha2\ncountryToAlpha2(\"US\"); // returns \"US\"\ncountryToAlpha2(\"USA\"); // returns \"US\"\ncountryToAlpha2(\"U S A\"); // returns \"US\"\ncountryToAlpha2(\"U.S.A\"); // returns \"US\"\ncountryToAlpha2(\"US of A\"); // returns \"US\"\ncountryToAlpha2(\"US and A\"); // returns \"US\"\ncountryToAlpha2(\"United States\"); // returns \"US\"\ncountryToAlpha2(\"United States of America\"); // returns \"US\"\ncountryToAlpha2(\"America\"); // returns \"US\"\n\n// countryToAlpha3\ncountryToAlpha3(\"US\"); // returns \"USA\"\n// etc...\n```\n\n## Commands\n\n| Script                 | Description |\n| -----------------------|-------------|\n| `npm run build`        | Builds project to `lib/`. |\n| `npm run seed`         | Takes data from the libraries [countryjs](https://www.npmjs.com/package/countryjs) and [country-list](https://www.npmjs.com/package/country-list) and updates `data/iso-alpha-*.json` and `data/country/*.json` files. |\n| `npm run generate`     | Takes seeded data, makes variants of names, checks for clashes (there's no mechanism to handle clashes as it's not come up) and dumps the data to `data/names.json`. |\n| `npm test`     | Runs tests. |\n\n## Contributing\n\n### Adding a New Country or Variant\n\nAlways run the following. It'll update everything from `countryjs` and `country-list` packages. It might include what you're looking for.\n\n```zsh\nnpm update --save-dev countryjs country-list\nnpm run seed\nnpm run generate\nnpm test\n```\n\n#### Add a New Country\n\n* Add the ISO 3166-1 alpha-2 code to `data/iso-alpha-2.json`\n* Add the ISO 3166-1 alpha-3 code to `data/iso-alpha-3.json`\n* Create a file for your new country `data/country/\u003cCOUNTRY_CODE\u003e.json` following the format of the other countries.\n* Add some tests\n* Run the following:\n\n```zsh\nnpm run generate\nnpm run test\n```\n\n#### Add a New Variant\n\n* Manually it to the `names` array in the correct `data/country/*.json` file\n* Add some tests\n* Run the following:\n\n```zsh\nnpm run generate\nnpm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnojacko%2Fnode-country-to-iso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnojacko%2Fnode-country-to-iso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnojacko%2Fnode-country-to-iso/lists"}