1.0.9 • Published 4 years ago

covid19-pakistan v1.0.9

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

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: https://github.com/ShahrozTanveer/covid-19-pakistan

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

Installation

npm i covid19-pakistan

Examples

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();
  console.log(latestStats);
  //fetching stats by state name
  let state = await covid19.getStatsByState("punjab");
  console.log(state);
  //fetching stats by date format(dd-mm-yyyy)
  let byDate = await covid19.getDataByDate("06-04-2020");
  console.log(byDate);
}
example();

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.

Author

Sharoz Tanveer

License

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


Made with :heart: in Javascript

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.9.7

4 years ago

0.9.6

4 years ago

0.9.5

4 years ago

0.9.0

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago