world-factbook

A javascript project for interacting with the world factbook

Usage no npm install needed!

<script type="module">
  import worldFactbook from 'https://cdn.skypack.dev/world-factbook';
</script>

README

world-factbook.js

This package allows the easy parsing of the public domain world factbook information from the CIA either (coming soon) via API or an offline set of JSON files.

Installation

Install package

$ npm install --save world-factbook

Usage

Append the complete factbook collection to an element

var worldFactbook = new WorldFactbook();
worldFactbook.renderHTML(false, profile.dataset.id).then(function(rendered) {
    $('#country-profile').append(rendered);
});

Development

  • Cloning the repo
$ git clone https://github.com/confirmed/world-factbook.git
  • Installing dependencies
$ npm install
  • Running scripts
Action Usage
Starting development mode npm start
Linting code npm run lint
Running unit tests npm run jest
Running code coverage npm run coverage
Running lint + tests npm test
Sending coverage results to Coveralls.io npm run coveralls

Author

Jonathan Bitgood

License

MIT