New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

countries-names

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

countries-names

A-Z list of country names and their codes

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

countries-names

A-Z list of countries for JavaScript Programmers. Supports NodeJS and all browsers

Build Status Code Coverage version MIT License Code of Conduct

Installation

To use with node:

npm install countries-names

Then in the console:

const countriesNames = require('countries-names');

To use directly in the browser:


<script src="path/to/yourCopyOf/countries-names.js"></script>

<script>

  console.log(Cnames.all());
  
</script>

or the minified version:

<script src="path/to/path/to/yourCopyOf/countries-names.min.js"></script>

Usage

Returns an array of all country names and their codes. [{name:'Afghanistan', code: 'AF'},...]

all()

Returns an array of country names ['Afghanistan', 'Albania', ...]

names()

Returns an array of country codes ['AF', 'AL', ...]

codes()

Returns the country name which matches the country code, or undefined if no country matches.

nameByCode(code)

Returns the country code which matches the country name, or undefined if no code matches.

codeByName(country)

FAQs

Package last updated on 11 Jul 2018

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