Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@segment/in-eu
Advanced tools
Privacy conscious EU detection browser library
in-eu
is a library for roughly detecting whether a website user is in the EU, without requiring a roundtrip to your server or a lookup against a GeoIP database.
It uses the browser's timezone (via the brilliant jstz and locale (navigator.languages
) to infer whether someone is in the EU.
in-eu
trades absolute accuracy for a cautious approach that's more lightweight and respectful of end-user privacy.
$ npm install @segment/in-eu
import inEU from '@segment/in-eu'
inEU()
// => true | false
or try one of the more specific helpers:
import { isInEUTimezone } from '@segment/in-eu'
/*
Only checks the browser timezone.
Useful for checking if someone is physically present in the EU
*/
isInEUTimezone()
// => true | false
import { isEULocale } from '@segment/in-eu'
/*
Only uses the browser's language/locale
Useful for checking if someone speaks an european language accounting
for locale. e.g. pt-PT (portuguese from Portugal)
*/
isEULocale()
// => true | false
in-eu is released under the MIT license.
FAQs
Privacy conscious EU detection browser library
The npm package @segment/in-eu receives a total of 47,013 weekly downloads. As such, @segment/in-eu popularity was classified as popular.
We found that @segment/in-eu demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 250 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.