Detalhes do pacote

detect-europe-js

faisalman2mMIT0.1.2

Detect if a user is from a country around the European Union (EU) area

ua-parser-js, detect-europe-js, detect-country, timezone

readme (leia-me)

detectEurope.js

Detect if a user is from a country around the European Union (EU), EFTA, EEA, or Schengen area based on their timezone settings.

npm i detect-europe-js

* isFromEU(): boolean

European Union (EU) countries

* isFromEEA(): boolean

EU countries + Iceland, Liechtenstein and Norway

* isFromEFTA(): boolean

Switzerland + Iceland, Liechtenstein and Norway

* isFromSchengen(): boolean

Schengen countries (including Romania, Bulgaria, and several microstates)

Code Example

import { isFromEU } from 'detect-europe-js';

if(isFromEU()) {
    // show cookie banner
}