README
COVID-19 Statistics
Tiny API wrapper with caching for https://corona.lmao.ninja using centra.
Usage
const { CoronaClient } = require('@aero/corona');
const corona = new CoronaClient({
lifetime: 8000 // cache lifetime in milliseconds
});
corona.total(): Promise<TotalStats>
corona.country(countryCode: string): Promise<CountryStats>
class CountryStats {
name: string;
cases: number;
todayCases: number;
deaths: number;
todayDeaths: number;
recovered: number;
critical: number;
active: number;
casesPerOneMillion: number;
deathsPerOneMillion: number;
}
class TotalStats {
cases: number;
deaths: number;
recovered: number;
updated: Date;
}