1.2.3 • Published 3 months ago

eu-country-check v1.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

This package is to check if the given country-code/country-name is part of the EU (European Union) or EEA (European Economic Area).

PRs Welcome Publish on NPMJS

Installation

npm i eu-country-check

or

yarn add eu-country-check

Then...

import { isEUCountry, isEEACountry } from "eu-country-check";

console.log(isEUCountry("040")); // { name: 'Austria', alpha2: 'AT', alpha3: 'AUT', numeric: '040' }
console.log(isEEACountry("NO")); // { name: 'Norway', alpha2: 'NO', alpha3: 'NOR', numeric: '578' }
console.log(isEUCountry("NO")); // undefined
console.log(isEEACountry("CA")); // undefined

Functions

eu-country-check contains 2 functions:

  • isEUCountry(countryCode: string)
  • isEEACountry(countryCode: string)

~  "countryCode" is required parameter that could be name, alpha2, alpha3 or numeric code.

⚖️ LICENSE

MIT © Sunny-unik/eu-country-check

1.2.3

3 months ago

1.2.2

4 months ago

1.2.0

8 months ago

1.0.2

8 months ago

1.0.1

9 months ago

1.0.4

8 months ago

1.2.1

8 months ago

1.0.3

8 months ago

1.0.0

2 years ago