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

countrydb

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

countrydb

Country and region codes DB for node.js

0.1.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

CountryDB

Country and region codes DB for node.js.

Usage

// JSON database is always stored in `countrydb.db` and it's
// at the moment the only provided member of `countrydb`.
var db = require("countrydb").db;

// DB maps two-letter country codes to an object having name
// and regions. The following will list all country codes and
// their names.
for (var k in db) {
  console.log("COUNTRY: '" + k + "' " + db[k].name);
}

// The following code lists all states in USA.
var regions = db.US.regions;
for (var k in regions) {
  console.log("STATE: '" + k + "' " + regions[k].name);
}

Keywords

code

FAQs

Package last updated on 12 Mar 2015

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