Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

covid19-data

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

covid19-data

Fetches data about the coronavirus outbreak.

  • 1.0.0
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

COVID-19

A basic NPM package to fetch data about the COVID-19 coronavirus outbreak.

Installation

Installing covid19-data is easy. Just run the following command to add it to your NPM project...

npm i covid19-data

Usage

There are no methods on the covid19-data package other than the default one. You can use the package to either get information about every country - including data about the world - or about a specific country.

The default method takes one parameter - country. If this parameter is not provided, the package returns an array full of data about every country, including the world (this is at index 0 of the array).

Example

const covid = require('covid19-data');

// get data about every country, including the world
const everyCountry = await covid();

// get data about a specific country - in this case the UK
const uk = await covid('uk');

Schemas

When the country has been inputted, the package returns an object like this:

{
  country: string,
  cases: number,
  todayCases: number,
  deaths: number,
  todayDeaths: number,
  recovered: number,
  critical: number
}

When the country has not been provided, it outputs an array of the schema. At index 0, there is a version of the schema that has the country set to null that represents an overview of the world as a whole.

License

covid19-data is licensed using the MIT license.

This means that you can...

  • Use the package for commercial purposes.
  • Modify the package.
  • Distribute the package.
  • Sublicense the package.
  • Use the package for private use.

This also means you can not...

  • Hold the author liable. The work is provided "as is"

In order to be able to do this you must...

  • Include the copyright notice in all copies or substantial uses of the work.
  • Include the license notice in all copies or substantial uses of the work.

FAQs

Package last updated on 16 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc