Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@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 330,175 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 3 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.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.