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.
@formatjs/intl-getcanonicallocales
Advanced tools
@formatjs/intl-getcanonicallocales is a utility package that provides a way to get the canonical form of locale identifiers. This is useful for ensuring consistency and correctness when dealing with locale strings in internationalization (i18n) tasks.
Get Canonical Locales
This feature allows you to convert a list of locale identifiers to their canonical form. This ensures that the locale identifiers are in a standard format, which is important for consistency in internationalization.
const getCanonicalLocales = require('@formatjs/intl-getcanonicallocales');
const locales = ['EN-US', 'fr-FR', 'es-419'];
const canonicalLocales = getCanonicalLocales(locales);
console.log(canonicalLocales); // ['en-US', 'fr-FR', 'es-419']
intl-locales-supported is a package that checks if the current environment supports a list of locales. While it does not provide canonicalization of locales, it is useful for determining locale support in different environments. Compared to @formatjs/intl-getcanonicallocales, it focuses more on support checking rather than canonicalization.
We've migrated the docs to https://formatjs.io/docs/polyfills/intl-getcanonicallocales/.
FAQs
Intl.getCanonicalLocales polyfill
The npm package @formatjs/intl-getcanonicallocales receives a total of 353,913 weekly downloads. As such, @formatjs/intl-getcanonicallocales popularity was classified as popular.
We found that @formatjs/intl-getcanonicallocales demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.