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.
@vtex/country-codes
Advanced tools
Country codes, translations and utilities
Through NPM:
$ npm install @vtex/country-codes
import toAlpha3 from '@vtex/country-codes/modules/toAlpha3'
Through vtex.io:
Add vtex.country-codes
to your manifest.json
dependencies
import { modules } from 'vtex.country-codes'
const { toAlpha2 } = modules
Converts an ISOAlpha3
country code to its ISOAlpha2
version (such as BRA
-> BR
)
Does the inverse procedure of the above function (BR
-> BRA
)
This entrypoint provides a list of all countries in the world, as an array where each country is also an array, whose first element is the alpha2
code and second element is the alpha3
code. You can use this together with the imported locales to display a full list of countries.
This library provides translations for country names in a large list of languages. The translation ID for a country is its ISOAlpha3
code preffixed by country
(example: **country.BRA**
). If using the vtex.io
app, the translations will be imported automatically. Otherwise, you should import the appropriate locale from the locales
folder.
Important: When using vtex.io
, if you do not import any component from the library, Render
will not copy the translations into your app. In such case, you need to import the special locales
entrypoint somewhere:
import 'vtex.country-codes/locales'
It is just an empty object and has no effect in your app.
Author: Gustavo Silva (@akaFTS), with codes and translations obtained from michaelwittig/node-i18n-iso-countries
This project is licensed under the MIT License.
FAQs
Utilities for managing country codes and translations
The npm package @vtex/country-codes receives a total of 149 weekly downloads. As such, @vtex/country-codes popularity was classified as not popular.
We found that @vtex/country-codes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 53 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.