@ottatech/locations
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

@ottatech/locations

Location information shared across otta apps.

Provides:

  • regions: a map of ISO-3166 alpha-2 codes and their English language names
  • subregions: a map of ISO-3166 alpha-2 code to a map of CLDR subregions and their English language names.

Reference:

Usage

import { regions, subregions } from "@ottatech/locations";

const user = { region: 'US', subregion: 'USTX' };

const countryLabel = regions[user.region]; // United States
const subregionLabel = subregions[user.region][user.subregion]; // Texas

Package Sidebar

Install

npm i @ottatech/locations

Weekly Downloads

12

Version

1.0.2

License

UNLICENSED

Unpacked Size

55.7 kB

Total Files

7

Last publish

Collaborators

  • emritcey1
  • migm2708
  • billyotta
  • tomverran
  • xavkearney