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

@reuters-graphics/covid-tracker-headlines

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reuters-graphics/covid-tracker-headlines

[![npm version](https://badge.fury.io/js/%40reuters-graphics%2Fcovid-tracker-headlines.svg)](https://badge.fury.io/js/%40reuters-graphics%2Fcovid-tracker-headlines)

  • 0.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

@reuters-graphics/covid-tracker-headlines

npm version

SmartText headline generator for COVID tracker project

Quickstart

$ yarn add @reuters-graphics/covid-tracker-headlines
import CovidTrackerHeadlines from '@reuters-graphics/covid-tracker-headlines';

const covidTrackerHeadlines = new CovidTrackerHeadlines({
  globalStatistics: { ... },
  smartText: { ... },
  locale: 'en',
});

covidTrackerHeadlines.getHeadlines(3);

Restrict headlines by countries...

// Get headlines only from included countries
const covidTrackerHeadlines = new CovidTrackerHeadlines({
  globalStatistics: { ... },
  smartText: { ... },
  include: ['IN'],
});

covidTrackerHeadlines.getHeadlines(3);

// Get headlines for all BUT excluded countries
const covidTrackerHeadlines = new CovidTrackerHeadlines({
  globalStatistics: { ... },
  smartText: { ... },
  exclude: ['IN', 'BR', 'RU', 'CH'],
});

covidTrackerHeadlines.getHeadlines(3);

SmartText Schema

{
  daysSinceSoHigh: { cases: [], deaths: [] },
  highestAvg: { cases: [], deaths: [] },
  newMax: {
    cases: { count: [], dailyAvg: [] },
    deaths: { count: [], dailyAvg: [] },
  },
  newMilestone: { cases: [], deaths: [] },
  newPeakTrend: {
    cases: { increasing: [], decreasing: [] },
    deaths: { increasing: [], decreasing: [] },
  },
  newRank: {
    cases: { total: [], dailyAvg: [] },
    deaths: { total: [], dailyAvg: [] },
  },
  newStreak: {
    cases: { increasing: [], decreasing: [] },
    deaths: { increasing: [], decreasing: [] },
  },
  newGlobalMilestone: { cases: [], deaths: [] },
}

Testing

$ yarn test

FAQs

Package last updated on 11 Jan 2021

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