bjf5201 / spin-the-globe

Get a list of the top 50 most populated countries or a random country name from the list
1 stars 0 forks source link

Spin the Globe

GitHub Actions Workflow Status

Commitizen friendly

Codecov (with branch)

NPM Version

NPM Downloads

GitHub contributors

Create a random array of countries without repeated entries.

Installation

npm install spin-the-globe

Usage

var spin = require('spin-the-globe');

console.log(spin.all);
/* Displays the entire list of countries in alphabetical order */

console.log(spin.random());
/* Displays a random country */

console.log(spin.build(3));
/* Creates and displayes an array of 3 random countries with no repeats */

console.log(spin.build());
/* Creates and displays an array of a single random country */
/* (Similar to spin.random() ) */

console.log(spin.build(1));
/* Same thing as console.log(spin.build()) */

console.log(spin.build(all));
/* Randomizes the list of spin.all() */