Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
iso-country-utils
Advanced tools
Readme
A helper to get country codes following the ISO 3316
npm install iso-country-utils
or
yarn add iso-country-utils
This is the Country
type:
type Country = {
name: string;
alpha2: string;
alpha3: string;
code: string;
};
You can get all the countries just calling
import { countries } from 'iso-country-utils';
You can get a country by its name with getCountryFromName
:
import { getCountryFromName } from 'iso-country-utils';
const US = getCountryFromName('United States of America');
You can get a country by its alpha2 value with getCountryFromAlpha2
:
import { getCountryFromAlpha2 } from 'iso-country-utils';
const US = getCountryFromAlpha2('US');
You can get a country by its alpha3 value with getCountryFromAlpha3
:
import { getCountryFromAlpha3 } from 'iso-country-utils';
const US = getCountryFromAlpha3('USA');
You can get a country by its code with getCountryFromAlpha3
:
import { getCountryFromCode } from 'iso-country-utils';
const US = getCountryFromCode('840');
You can find a full list of countries from the source
👤 Pedro Filho pedro@filho.me
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!
FAQs
A helper to get country codes following the ISO 3316
The npm package iso-country-utils receives a total of 359 weekly downloads. As such, iso-country-utils popularity was classified as not popular.
We found that iso-country-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.