Covid-19 Tracker
View information on the Coronavirus outbreak around the world. Updated By: Apollo#6000
Update:
- Updated the API Wrapper to V2 of https://corona.lmao.ninja/v2/
Installation
Stable Release (v2.0.1
)
npm i covidtracker@201
Methods
.getAll()
.getCountry({country, sort})
.getState({state, sort})
.getHistoric({country, province})
.getJHU({country, province, sort})
Loading and using the module
We suggest you load the module via require
, pending the stabalizing of es modules in node:
const covid = ;
Documentation
To actually use the data, you will need an async/await.
// Declare the packageconst covid = ; // Now we create a async/awaitasync { // Now we await it. let all = await covid; // Make sure you return it, this usually implies if you are using this inside a function. // Use \n to break lines. return console}
Sorting the data.
Some methods can be sorted.
const covid = ; async { let sortedCountries = await covid; return console; let sortedStates = await covid; return console;};
Filtering for a specific country/state.
const covid = ; async { // Specific Country let specificCountry = await covid; return console; // Specific State let specificState = await covid; return console;};