{"id":19217987,"url":"https://github.com/sallar/country-tools","last_synced_at":"2026-03-17T17:13:56.077Z","repository":{"id":26890775,"uuid":"110364314","full_name":"sallar/country-tools","owner":"sallar","description":"🇪🇺 A simple NodeJS helper for getting information about countries of the world.","archived":false,"fork":false,"pushed_at":"2024-10-24T11:36:11.000Z","size":623,"stargazers_count":33,"open_issues_count":8,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T08:54:35.140Z","etag":null,"topics":["country","currency","i18n","localization"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/sallar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2017-11-11T17:13:36.000Z","updated_at":"2025-08-09T10:32:39.000Z","dependencies_parsed_at":"2024-11-09T14:25:09.570Z","dependency_job_id":"a45ee315-0c98-4dce-a2b2-d304e1079f07","html_url":"https://github.com/sallar/country-tools","commit_stats":{"total_commits":22,"total_committers":3,"mean_commits":7.333333333333333,"dds":"0.36363636363636365","last_synced_commit":"671a2c601a3022bf1229a6b34cb548f730b301a0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sallar/country-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sallar%2Fcountry-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sallar%2Fcountry-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sallar%2Fcountry-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sallar%2Fcountry-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sallar","download_url":"https://codeload.github.com/sallar/country-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sallar%2Fcountry-tools/sbom","scorecard":{"id":796510,"data":{"date":"2025-08-11","repo":{"name":"github.com/sallar/country-tools","commit":"671a2c601a3022bf1229a6b34cb548f730b301a0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/16 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":"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":"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":"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":"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":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 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":"20 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"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-23T09:09:29.789Z","repository_id":26890775,"created_at":"2025-08-23T09:09:29.789Z","updated_at":"2025-08-23T09:09:29.789Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30627929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T14:16:03.965Z","status":"ssl_error","status_checked_at":"2026-03-17T14:16:03.380Z","response_time":56,"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":["country","currency","i18n","localization"],"created_at":"2024-11-09T14:24:49.360Z","updated_at":"2026-03-17T17:13:56.045Z","avatar_url":"https://github.com/sallar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Country Tools\n\n[![Build Status](https://travis-ci.org/sallar/country-tools.svg?branch=master)](https://travis-ci.org/sallar/country-tools)\n\nA simple NodeJS helper for getting information about countries of the world.\n\n## Usage\n\n```sh\nnpm install country-tools\n```\n\n```js\nimport { getCurrencyFromIso2 } from 'country-tools';\n```\n\n## Data\n\nData has been downloaded from\n[mledoze/countries](https://github.com/mledoze/countries).\n\n## Included Tools\n\n### Get Currency Code from Country ISO2 Code\n\nReturns a country's currency given it's ISO2 code (`US`, `FI`, etc).\n\n```ts\ngetCurrencyFromIso2(countryCode: string): string | null\n```\n\nSample:\n\n```js\ngetCurrencyFromIso2('US'); // USD\ngetCurrencyFromIso2('FI'); // EUR\ngetCurrencyFromIso2('XX'); // null\n```\n\n### Get Country Information from Country ISO2 Code\n\nReturns complete information for a given country:\n\n```ts\nfindCountryByIso2(countryCode: string): Country | null\n```\n\nSample:\n\n```js\nfindCountryByIso2('FI'); // { ...info }\nfindCountryByIso2('XX'); // null\n```\n\nThis function returns type `Country` which looks like the following:\n\n```js\nconst test = {\n  name: {\n    common: 'Finland',\n    official: 'Republic of Finland',\n    native: {\n      fin: {\n        official: 'Suomen tasavalta',\n        common: 'Suomi',\n      },\n      swe: {\n        official: 'Republiken Finland',\n        common: 'Finland',\n      },\n    },\n  },\n  tld: ['.fi'],\n  cca2: 'FI',\n  ccn3: '246',\n  cca3: 'FIN',\n  cioc: 'FIN',\n  independent: true,\n  status: 'officially-assigned',\n  currencies: {\n    EUR: {\n      name: 'Euro',\n      symbol: '€',\n    },\n  },\n  idd: {\n    root: '+3',\n    suffixes: ['58'],\n  },\n  capital: ['Helsinki'],\n  altSpellings: ['FI', 'Suomi', 'Republic of Finland', 'Suomen tasavalta', 'Republiken Finland'],\n  region: 'Europe',\n  subregion: 'Northern Europe',\n  languages: {\n    fin: 'Finnish',\n    swe: 'Swedish',\n  },\n  translations: {\n    ces: {\n      official: 'Finská republika',\n      common: 'Finsko',\n    },\n    deu: {\n      official: 'Republik Finnland',\n      common: 'Finnland',\n    },\n    est: {\n      official: 'Soome Vabariik',\n      common: 'Soome',\n    },\n    fin: {\n      official: 'Suomen tasavalta',\n      common: 'Suomi',\n    },\n    fra: {\n      official: 'République de Finlande',\n      common: 'Finlande',\n    },\n    hrv: {\n      official: 'Republika Finska',\n      common: 'Finska',\n    },\n    hun: {\n      official: 'Finn Köztársaság',\n      common: 'Finnország',\n    },\n    ita: {\n      official: 'Repubblica di Finlandia',\n      common: 'Finlandia',\n    },\n    jpn: {\n      official: 'フィンランド共和国',\n      common: 'フィンランド',\n    },\n    kor: {\n      official: '핀란드 공화국',\n      common: '핀란드',\n    },\n    nld: {\n      official: 'Republiek Finland',\n      common: 'Finland',\n    },\n    per: {\n      official: 'جمهوری فنلاند',\n      common: 'فنلاند',\n    },\n    pol: {\n      official: 'Republika Finlandii',\n      common: 'Finlandia',\n    },\n    por: {\n      official: 'República da Finlândia',\n      common: 'Finlândia',\n    },\n    rus: {\n      official: 'Финляндская Республика',\n      common: 'Финляндия',\n    },\n    slk: {\n      official: 'Fínska republika',\n      common: 'Fínsko',\n    },\n    spa: {\n      official: 'República de Finlandia',\n      common: 'Finlandia',\n    },\n    urd: {\n      official: 'جمہوریہ فن لینڈ',\n      common: 'فن لینڈ',\n    },\n    zho: {\n      official: '芬兰共和国',\n      common: '芬兰',\n    },\n  },\n  latlng: [64, 26],\n  landlocked: false,\n  borders: ['NOR', 'SWE', 'RUS'],\n  area: 338424,\n  flag: '🇫🇮',\n  demonyms: {\n    eng: {\n      f: 'Finnish',\n      m: 'Finnish',\n    },\n    fra: {\n      f: 'Finlandaise',\n      m: 'Finlandais',\n    },\n  },\n};\n```\n\n## License\n\nThe code is licensed under the [MIT License](LICENSE). See the data's\n[LICENSE](https://github.com/mledoze/countries/blob/master/LICENSE) file for\nmore information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsallar%2Fcountry-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsallar%2Fcountry-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsallar%2Fcountry-tools/lists"}