Add new helper method: isFromEU() to detect whether user comes from an EU country

This commit is contained in:
Faisal Salman
2024-09-14 12:38:51 +07:00
parent b9f1bf6223
commit db1612401f
5 changed files with 31 additions and 1 deletions

22
package-lock.json generated
View File

@@ -22,6 +22,9 @@
}
],
"license": "AGPL-3.0-or-later",
"dependencies": {
"detect-europe-js": "^0.1.1"
},
"bin": {
"ua-parser-js": "script/cli.js"
},
@@ -1664,6 +1667,25 @@
"integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==",
"dev": true
},
"node_modules/detect-europe-js": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/detect-europe-js/-/detect-europe-js-0.1.1.tgz",
"integrity": "sha512-+bUXDf+tI3L4dcEuRdAFa44Amx9aEaJzoZssx7Xis4H1bXWc5fAcOP850BOj0wJPRzOdovOuOVEvrg6T+GflZA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/faisalman"
},
{
"type": "opencollective",
"url": "https://opencollective.com/ua-parser-js"
},
{
"type": "paypal",
"url": "https://paypal.me/faisalman"
}
]
},
"node_modules/detect-libc": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz",