Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eu-country-check

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eu-country-check

Check if given countryCode is part of the European countries

  • 1.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
256
increased by7.56%
Maintainers
1
Weekly downloads
 
Created
Source

eu-country-check

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

Keywords

FAQs

Package last updated on 14 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc