{"id":17113671,"url":"https://github.com/totakke/clj-iso3166","last_synced_at":"2025-04-13T02:32:14.218Z","repository":{"id":57713876,"uuid":"199602091","full_name":"totakke/clj-iso3166","owner":"totakke","description":"ISO 3166 country definitions for Clojure(Script)","archived":false,"fork":false,"pushed_at":"2024-05-08T12:34:11.000Z","size":34,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T20:21:21.856Z","etag":null,"topics":["clojure","clojurescript","iso3166"],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/totakke.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":"2019-07-30T07:47:16.000Z","updated_at":"2024-12-27T18:59:02.000Z","dependencies_parsed_at":"2024-11-07T18:04:15.304Z","dependency_job_id":"3f1852d8-d592-4ba4-a086-24964a77578b","html_url":"https://github.com/totakke/clj-iso3166","commit_stats":{"total_commits":32,"total_committers":2,"mean_commits":16.0,"dds":0.03125,"last_synced_commit":"c048420b3ce62632686fa6879b2d4d1bf91985d6"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totakke%2Fclj-iso3166","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totakke%2Fclj-iso3166/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totakke%2Fclj-iso3166/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totakke%2Fclj-iso3166/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/totakke","download_url":"https://codeload.github.com/totakke/clj-iso3166/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248657793,"owners_count":21140842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["clojure","clojurescript","iso3166"],"created_at":"2024-10-14T17:11:34.597Z","updated_at":"2025-04-13T02:32:13.976Z","avatar_url":"https://github.com/totakke.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clj-iso3166\n\n[![Clojars Project](https://img.shields.io/clojars/v/net.totakke/clj-iso3166.svg)](https://clojars.org/net.totakke/clj-iso3166)\n[![build](https://github.com/totakke/clj-iso3166/actions/workflows/build.yml/badge.svg)](https://github.com/totakke/clj-iso3166/actions/workflows/build.yml)\n\nISO 3166 country definitions for Clojure(Script)\n\n## Installation\n\nClojure CLI/deps.edn (as Git):\n\n```clojure\nio.github.totakke/clj-iso3166 {:git/tag \"v0.4.0\" :git/sha \"3877e13\"}\n```\n\nClojure CLI/deps.edn (as Maven):\n\n```clojure\nnet.totakke/clj-iso3166 {:mvn/version \"0.4.0\"}\n```\n\nLeiningen/Boot:\n\n```clojure\n[net.totakke/clj-iso3166 \"0.4.0\"]\n```\n\n## Usage\n\n### Basics\n\n```clojure\n(require '[clj-iso3166.country :as c])\n\nc/countries\n;;=\u003e [{:name \"Andorra\", :numeric 20, :alpha3 \"AND\", :alpha2 \"AD\"}\n;;    {:name \"United Arab Emirates\", :numeric 784, :alpha3 \"ARE\", :alpha2 \"AE\"}\n;;    {:name \"Afghanistan\", :numeric 4, :alpha3 \"AFG\", :alpha2 \"AF\"}\n;;    {:name \"Antigua and Barbuda\", :numeric 28, :alpha3 \"ATG\", :alpha2 \"AG\"}\n;;    {:name \"Anguilla\", :numeric 660, :alpha3 \"AIA\", :alpha2 \"AI\"}\n;;    ...]\n\n(c/name-\u003ecountry \"Japan\")\n;;=\u003e {:name \"Japan\", :numeric 392, :alpha3 \"JPN\", :alpha2 \"JP\"}\n\n(c/numeric-\u003ecountry 380)\n;;=\u003e {:name \"Italy\", :numeric 380, :alpha3 \"ITA\", :alpha2 \"IT\"}\n\n(c/alpha3-\u003ecountry \"USA\")\n;;=\u003e {:name \"United States\", :numeric 840, :alpha3 \"USA\", :alpha2 \"US\"}\n\n(c/alpha2-\u003ecountry \"EG\")\n;;=\u003e {:name \"Egypt\", :numeric 818, :alpha3 \"EGY\", :alpha2 \"EG\"}\n```\n\n### Former Countries\n\n```clojure\n(require '[clj-iso3166.former-country :as fc])\n\n(fc/name-\u003eformer-country \"Czechoslovakia\")\n;;=\u003e {:name \"Czechoslovakia\",\n;;    :alpha4 \"CSHH\",\n;;    :former-code {:numeric 200, :alpha3 \"CSK\", :alpha2 \"CS\"},\n;;    :latter-codes [{:numeric 203, :alpha3 \"CZE\", :alpha2 \"CZ\"}\n;;                   {:numeric 703, :alpha3 \"SVK\", :alpha2 \"SK\"}]}\n\n(def yugoslavia (fc/alpha4-\u003eformer-country \"YUCS\"))\n\n(fc/migrate-country yugoslavia)\n;;=\u003e ({:name \"Montenegro\", :numeric 499, :alpha3 \"MNE\", :alpha2 \"ME\"}\n;;    {:name \"Serbia\", :numeric 688, :alpha3 \"SRB\", :alpha2 \"RS\"})\n```\n\n### Spec\n\n```clojure\n(require '[clj-iso3166.country :as c]\n         '[clojure.spec.alpha :as s])\n\n(s/valid? ::c/alpha2 \"JP\")\n;;=\u003e true\n\n(s/explain ::c/alpha3 \"IT\")\n;; \"IT\" - failed: (re-matches #\"[A-Z]{3}\" %) spec: :clj-iso3166.country/alpha3\n```\n\n## License\n\nCopyright © 2019 [Toshiki Takeuchi](https://totakke.net/)\n\nDistributed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotakke%2Fclj-iso3166","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftotakke%2Fclj-iso3166","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotakke%2Fclj-iso3166/lists"}