Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@brixtol/country-names
Advanced tools
Mappings for 2 letter (Alpha 2) country codes to English country name
Country code (3166-1 alpha-2) to Country name (ISO 3166 mappings used by the Brixtol Textiles internal API when dealing with Localization and i18n operations.
Mappings returned in the English Language.
Minified: 4.15 KB
Gzipped: 2.25 KB
pnpm add @brixtol/country-names
npm install @brixtol/country-names
yarn add @brixtol/country-names
You can pass in a 2 letter country code that is lowercase, uppercase or a mixture of both.
import { getCountryName } from '@brixtol/country-names';
const sweden = getCountryName('SE'); // Sweden
const netherlands = getCountryName('nl'); // Netherlands
const usa = getCountryName('uS'); // United States of America
The module also exposes the raw mappings and interface on the export. The mappings object is provided read only using Object.freeze. In addition to the raw mappings a ISO code union export is also exposed.
import { Countries, ICountries, CountryCodes, Country } from '@brixtol/country-names';
// Mapping Object
Countries.SE; // Sweden
Countries.NL; // Netherlands
Countries.RU; // Russian Federation
// Interface
ICountries.SE; // Sweden
ICountries.NL; // Netherlands
ICountries.RU; // Russian Federation
// Country Code Union
CountryCodes<'SE' | 'NL' | 'RU'>; // etc etc
The interface is identical to the mapping
Static GeoIP utility
Country code to currency code mappings:
Currency code to currency symbol mappings:
Licensed under MIT
We ♡ open source!
1.4.1 - 01/12/2021
KG
(Kyrgyzstan)Saint Barthelemy
to official name Saint Barthélemy
FAQs
Mappings for 2 letter (Alpha 2) country codes to English country name
We found that @brixtol/country-names 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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.