random-country

1.0.1 • Public • Published

random-country

Return a random country.

MIT License

build:? coverage:?

Install

$ npm install --save random-country 

Usage

var randomCountry = require('random-country');
 
// API
// - randomCountry([options]);
 
// options
// - full

By default, returns only the 2 letter ISO 3166-1 code for the country:

randomCountry();
// => 'LT'

Optionally specify that it ought to return a full country name:

randomCountry({ full: true });
// => 'Venezuela'

Related

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.

Package Sidebar

Install

npm i random-country

Weekly Downloads

381

Version

1.0.1

License

MIT

Last publish

Collaborators

  • bubkoo