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-3166-utils
Advanced tools
Readme
A helper to get country codes following the ISO 3316
npm install iso-3166-utils
You can get all the countries just calling
import { country } from "iso-3166-utils";
const countries = country.data;
You can get a country by its name with getFromName
:
import { country } from "iso-3166-utils";
const US = country.getFromName("United States of America");
You can get a country by its alpha2 value with getFromAlpha2
:
import { country } from "iso-3166-utils";
const US = country.getFromAlpha2("US");
You can get a country by its alpha3 value with getFromAlpha3
:
import { country } from "iso-3166-utils";
const US = country.getFromAlpha3("USA");
You can get a country by its code with getFromAlpha3
:
import { country } from "iso-3166-utils";
const US = country.getFromCode("840");
And you can have the same for subdivisions, like AK
:
import { subdivision } from "iso-3166-utils";
const AK = subdivision("us").getFromCode("AK");
Or you can get it from the name:
import { subdivision } from "iso-3166-utils";
const AK = subdivision("us").getFromName("Alaska");
You can find a full list of countries from the source
You can find a full list of subdivisions from the source
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
FAQs
A helper to get country codes following the ISO 3316
The npm package iso-3166-utils receives a total of 1 weekly downloads. As such, iso-3166-utils popularity was classified as not popular.
We found that iso-3166-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.