# detect-europe-js

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

Latest version **0.1.2** (published 2024-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install detect-europe-js
pnpm add detect-europe-js
yarn add detect-europe-js
bun add detect-europe-js
```

## Health

**Score 45/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2024-11-07 |
| First published | 2024-09-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 17.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 2 |
| Author | Faisal Salman |
| Maintainers | faisalman |
| Keywords | ua-parser-js, detect-europe-js, detect-country, timezone, europe, eu, eea, efta, schengen, gdpr, dma, dsa, dga, data-act, ai-act, cybersecurity-act |

## Links

- npm: https://www.npmjs.com/package/detect-europe-js
- Repository: https://github.com/faisalman/detect-europe-js
- Homepage: https://github.com/faisalman/detect-europe-js#readme
- Issues: https://github.com/faisalman/detect-europe-js/issues
- Funding: https://github.com/sponsors/faisalman
- npm.io page: https://npm.io/package/detect-europe-js

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 0.1.2 (latest) — 2024-11-07
- 0.1.1 — 2024-09-07
- 0.1.0 — 2024-09-06

## README

# 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.

```sh
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

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

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

---
_Source: https://npm.io/package/detect-europe-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
