package ISO3166
OCaml library for working with ISO3166
Install
Dune Dependency
Authors
Maintainers
Sources
ISO3166-0.1.0.tbz
sha256=3f796838653b5d8df1772ca8c5e22aa2c02c832a83721738551ac6bc08b7ba4e
sha512=2c5fd35bf70b21a9ff80035a96f9d2cf88147e6684a4abbdd92103925ab8f7ba7843eb76f7cc1323c3e427c05eb11111c406a3f340f494130842000317399646
README.md.html
OCaml ISO3166
This library provides a pure OCaml interface to working with the ISO 3166 standard (a.k.a country codes).
# ISO3166.alpha3_to_country `IRL |> ISO3166.Country.name;;
- : string = "Ireland"
The Country
module already contains all of the countries for convenience named after the alpha2 country code.
# ISO3166.Country.fr |> ISO3166.Country.name;;
- : string = "France"
# ISO3166.Country.fr |> ISO3166.Country.numeric |> ISO3166.numeric_to_string;;
- : string = "250"
The original use-case for this library was to encode the conversion from alpha2 country codes to strings. Lots of public APIs that provide country-specific information use ISO3166 to distinguish between countries.
# ISO3166.alpha2_to_string `ES;;
- : string = "ES"
Data Source
The data that generates the OCaml file comes from https://github.com/lukes/ISO-3166-Countries-with-Regional-Codes/commit/6741ae83a08ce1802d22849db0a944d99e254bae which has the following disclaimer which applies to this library too.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>