Quick and easy way to get covid-19 in Pakistan updates.

Usage no npm install needed!

<script type="module">
  import covid19Pakistan from '';


NPM version NPM Downloads Gitter

NPM Download Stats

Please consider following this project's author, Sharoz Tanveer, and consider starring the project to show your :heart: and support.

covid19-pakistan v1.0.0(stable)🚀

Import the latest Pakistan Covid-19 data in Javascript

Get Latest Covid-19 Pakistan Data:

Quick and easy way to get covid-19 in Pakistan updates.
use async/await.


npm i covid19-pakistan


const covid19 = require("covid19-pakistan");
async function example() {
  //fetching latest dataset from github
  const data = await covid19.getData(); //contains whole dataset

  const latestData = await covid19.getLatestData(data);
  console.log(latestData); //just contains today's data

  //fetching latest stats
  const latestStats = await covid19.getTotalStats();
  //fetching stats by state name
  let state = await covid19.getStatsByState("punjab");
  //fetching stats by date format(dd-mm-yyyy)
  let byDate = await covid19.getDataByDate("06-04-2020");

getData() methdod will return array of Objects containing covid-19 for Pakistan data.
getLatestData() method requires parameter( array data returned by getData() method ),It will return data of lastest day.
getTotalStats() method will return Object that will contain latest stats of covid-19 (Pakistan)
getStatsByState() method requires state name and it will return object containg data of provided state.
getDataByDate() method requires date in format (dd-mm-yyyy) and it will return data from that given date.


Sharoz Tanveer


Copyright © 2020, Sharoz Tanveer. Released under the MIT License.

Made with :heart: in Javascript