3.0.0 • Published 3 years ago

iso-country v3.0.0

Weekly downloads
229
License
MIT
Repository
github
Last release
3 years ago

iso-country

Search for Countries By Iso Code

How to Use

Import the function and type into your application.

import { Country, isoCountry } from 'iso-country';

Pass either an ISO3166 Alpha 2 (e.g. US) or Alpha 3 (e.g. USA) code into the isoCountry function.

const unitedStates: Country = isoCountry('us');
console.log(unitedStates);

/*
{
  code: 'US',
  iso2: 'US',
  iso3: 'USA',
  name: 'United States',
  localName: 'United States',
  emoji: '🇺🇸',
  emojiCode: '1F1FA 1F1F8'
}
*/

License

Unless stated otherwise all works are:

  • Copyright © 2019+ Ryan Brady

and licensed under:

3.0.0

3 years ago

2.3.0

3 years ago

2.2.0

3 years ago

2.1.0

3 years ago

2.0.0

4 years ago

1.0.8

4 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago