Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@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 187,440 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.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.