detect-europe-js
Detect if a user is from a country around the European Union (EU) area
Last updated a year ago by faisalman .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install detect-europe-js 
SYNC missed versions from official npm registry.

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
}

Current Tags

  • 0.1.2                                ...           latest (a year ago)

3 Versions

  • 0.1.2                                ...           a year ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |