Socket
Socket
Sign inDemoInstall

shortcountrynames

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shortcountrynames

[![PyPI](https://img.shields.io/pypi/v/shortcountrynames.svg)](https://pypi.org/project/shortcountrynames/) [![npm](https://img.shields.io/npm/v/shortcountrynames.svg)](https://www.npmjs.com/package/shortcountrynames)


Version published
Weekly downloads
75
decreased by-8.54%
Maintainers
1
Weekly downloads
 
Created
Source

PyPI npm

“Do One Thing and Do It Well” - this package helps turning two or three letter codes into short English names.

shortcountrynames is maintained by Robert Gieseke (rob.g@web.de).

Data Package

Data Package, a simple CSV file, with two and three-letter country codes and short English country names based on the country-codes Data Package with some changes and additions to the choice of short names.

Python module

Install with

pip install shortcountrynames

Usage

from shortcountrynames import to_name

assert to_name("DE") == "Germany"
assert to_name("DEU") == "Germany"

JavaScript module

Install with

npm install shortcountrynames

Usage

import {names, to_name} from 'shortcountrynames'

// Define custom codes
names["TEST"] = 'test'

console.log(to_name("DEU")) // Germany
console.log(to_name("TEST")) // test

Notes

Non-standard codes:

EU, EUU - European Union

XK, XKX - Kosovo

License

CC0

Keywords

FAQs

Package last updated on 14 Jul 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc