{"id":39031891,"url":"https://github.com/fragaria/address-formatter","last_synced_at":"2026-01-17T17:40:48.160Z","repository":{"id":37952649,"uuid":"170749316","full_name":"fragaria/address-formatter","owner":"fragaria","description":"Universal international address formatter in Javascript","archived":false,"fork":false,"pushed_at":"2025-12-26T13:00:14.000Z","size":5966,"stargazers_count":106,"open_issues_count":0,"forks_count":21,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-28T00:59:07.809Z","etag":null,"topics":["addresses","formatting","i18n"],"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/fragaria.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-02-14T19:53:08.000Z","updated_at":"2025-12-26T13:00:16.000Z","dependencies_parsed_at":"2025-12-26T15:07:41.914Z","dependency_job_id":null,"html_url":"https://github.com/fragaria/address-formatter","commit_stats":{"total_commits":784,"total_committers":9,"mean_commits":87.11111111111111,"dds":0.6007653061224489,"last_synced_commit":"15f5fc23daf6a20a9b278de7347ef5c99916131d"},"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"purl":"pkg:github/fragaria/address-formatter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fragaria%2Faddress-formatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fragaria%2Faddress-formatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fragaria%2Faddress-formatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fragaria%2Faddress-formatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fragaria","download_url":"https://codeload.github.com/fragaria/address-formatter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fragaria%2Faddress-formatter/sbom","scorecard":{"id":408788,"data":{"date":"2025-08-11","repo":{"name":"github.com/fragaria/address-formatter","commit":"475f2bbd279e6dfa7cbc58dde7e0ace5f3c3a303"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.9,"checks":[{"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":"Maintained","score":10,"reason":"23 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10","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/continuous-testing.yaml:1","Warn: no topLevel permission defined: .github/workflows/npm-release.yaml: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":"Pinned-Dependencies","score":5,"reason":"dependency not pinned by hash detected -- score normalized to 5","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-testing.yaml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/fragaria/address-formatter/continuous-testing.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-testing.yaml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/fragaria/address-formatter/continuous-testing.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-testing.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/fragaria/address-formatter/continuous-testing.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/continuous-testing.yaml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/fragaria/address-formatter/continuous-testing.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-release.yaml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/fragaria/address-formatter/npm-release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-release.yaml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/fragaria/address-formatter/npm-release.yaml/master?enable=pin","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   2 out of   2 npmCommand 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":"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":"Code-Review","score":0,"reason":"Found 0/11 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":"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":"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":"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":"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 'master'"],"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":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/npm-release.yaml:4"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 22 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":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"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-18T22:05:20.450Z","repository_id":37952649,"created_at":"2025-08-18T22:05:20.450Z","updated_at":"2025-08-18T22:05:20.450Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28513955,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"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":["addresses","formatting","i18n"],"created_at":"2026-01-17T17:40:46.537Z","updated_at":"2026-01-17T17:40:48.145Z","avatar_url":"https://github.com/fragaria.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JS Address formatter\n\n[![Coverage Status](https://coveralls.io/repos/github/fragaria/address-formatter/badge.svg?branch=master)](https://coveralls.io/github/fragaria/address-formatter?branch=master)\n\nBased on an amazing work of [OpenCage Data](https://github.com/OpenCageData/address-formatting/)\nwho collected so many international formats of postal addresses, this is a Javascript implementation\nof that formatter.\n\nThis library can format almost anything that comes out of\nOpen Street Maps' [Nominatim API](https://wiki.openstreetmap.org/wiki/Nominatim)\nin the `address` field. Other compatible sources of data \nsuch as [Photon](https://photon.komoot.io/) might be used as well.\n\nIt can automatically detect the country's\nformatting customs, but allows you to *pick a specific country\nformat*. Furthermore, it allows you to abbreviate the common names,\nsuch as `Avenue` or `Road`.\n\nThe formatting specification for the whole world is part of\nthe distribution package, there is currently no plan to prepare\nsmaller builds with limited area coverage.\n\n## Installation \u0026 Usage\n\n### Node\n\n```sh\nnpm i @fragaria/address-formatter\n```\n\n```js\n// import addressFormatter from '@fragaria/address-formatter';\nconst addressFormatter = require('@fragaria/address-formatter');\n\n// Basic examples\nconst formatted = addressFormatter.format({\n  \"houseNumber\": 301,\n  \"road\": \"Hamilton Avenue\",\n  \"neighbourhood\": \"Crescent Park\",\n  \"city\": \"Palo Alto\",\n  \"postcode\": 94303,\n  \"county\": \"Santa Clara County\",\n  \"state\": \"California\",\n  \"country\": \"United States of America\",\n  \"countryCode\": \"US\",\n});\n/*\n301 Hamilton Avenue\nPalo Alto, CA 94303\nUnited States of America\n*/\nconst formattedWithAppendedCountry = addressFormatter.format({\n  \"houseNumber\": 301,\n  \"road\": \"Hamilton Avenue\",\n  \"neighbourhood\": \"Crescent Park\",\n  \"city\": \"Palo Alto\",\n  \"postcode\": 94303,\n  \"county\": \"Santa Clara County\",\n  \"state\": \"California\",\n  \"countryCode\": \"US\",\n}, {\n  appendCountry: true\n});\n/*\n301 Hamilton Avenue\nPalo Alto, CA 94303\nUnited States of America\n*/\n\n// You can overwrite the country code incoming from the map service\nconst abbreviatedUkFormat = addressFormatter.format({\n  \"houseNumber\": 301,\n  \"road\": \"Hamilton Avenue\",\n  \"neighbourhood\": \"Crescent Park\",\n  \"city\": \"Palo Alto\",\n  \"postcode\": 94303,\n  \"county\": \"Santa Clara County\",\n  \"state\": \"California\",\n  \"country\": \"United States of America\",\n  \"countryCode\": \"US\",\n}, {\n  abbreviate: true,\n  countryCode: 'UK'\n});\n/*\n301 Hamilton Ave\nPalo Alto\n94303\nUSA\n*/\n\n// You can use a fallback to keep the library working when the country code is wrong\nconst fallbackCountryCode = addressFormatter.format({\n  \"houseNumber\": 301,\n  \"road\": \"Hamilton Avenue\",\n  \"neighbourhood\": \"Crescent Park\",\n  \"city\": \"Palo Alto\",\n  \"postcode\": 94303,\n  \"county\": \"Santa Clara County\",\n  \"state\": \"California\",\n  \"country\": \"United States of America\",\n  \"countryCode\": \"yu\",\n}, {\n  abbreviate: true,\n  fallbackCountryCode: 'UK'\n});\n/*\n301 Hamilton Ave\nPalo Alto\n94303\nUSA\n*/\n\n// You can get the address as a list of lines to make your formatting easier\nconst formattedAsLines = addressFormatter.format({\n  \"houseNumber\": 301,\n  \"road\": \"Hamilton Avenue\",\n  \"neighbourhood\": \"Crescent Park\",\n  \"city\": \"Palo Alto\",\n  \"postcode\": 94303,\n  \"county\": \"Santa Clara County\",\n  \"state\": \"California\",\n  \"country\": \"United States of America\",\n  \"countryCode\": \"US\",\n}, {\n  output: 'array'\n});\n/*\n[\n  '301 Hamilton Avenue',\n  'Palo Alto, CA 94303',\n  'United States of America'\n]\n*/\n```\n\n### Direct use on webpage\n\n```html\n\u003cscript type=\"text/javascript\" src=\"https://unpkg.com/@fragaria/address-formatter@latest\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\"\u003e\n  const formatted = window.addressFormatter.format({\n    \"houseNumber\": 301,\n    \"road\": \"Hamilton Avenue\",\n    \"neighbourhood\": \"Crescent Park\",\n    \"city\": \"Palo Alto\",\n    \"postcode\": 94303,\n    \"county\": \"Santa Clara County\",\n    \"state\": \"California\",\n    \"country\": \"United States of America\",\n    \"countryCode\": \"US\",\n  });\n  /*\n  301 Hamilton Avenue\n  Palo Alto, CA 94303\n  United States of America\n  */\n\u003c/script\u003e\n```\n\n## Development \u0026 Tests\n\n```sh\n$ git clone git@github.com:fragaria/address-formatter.git\n$ cd address-formatter\n# Install the proper NodeJS\n$ nvm install\n# Download the /OpenCageData/address-formatting/ spec\n$ npm run pull-submodules\n# Install dependencies\n$ npm install\n# Generate JS-friendly spec\n$ npm run prepare-templates\n# Run the tests\n$ npm test\n```\n\n### Making a release\n\n```sh\n$ npm version X.Y.Z\n$ git push origin master \u0026\u0026 git push origin vX.Y.Z\n```\n\nAnd the CI server takes care of the rest\n\n# Help needed\n\nAll pull requests are definitely welcome. If an address\nis badly formatted, submit PRs directly to the \n[original repository](https://github.com/OpenCageData/address-formatting/)\nwith a minimal localized test-case.\n\n# Acknowledgments\n\nGrat many thanks to these implementations:\n\n- [Perl](https://github.com/OpenCageData/perl-Geo-Address-Formatter)\n- [PHP](https://github.com/predicthq/address-formatter-php)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffragaria%2Faddress-formatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffragaria%2Faddress-formatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffragaria%2Faddress-formatter/lists"}