├── .github └── workflows │ ├── publish.yml │ └── unittests.yml ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── index.d.ts ├── index.js ├── index.spec.js ├── package-lock.json ├── package.json └── tsconfig.json /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish 2 | 3 | on: 4 | release: 5 | types: [created] 6 | 7 | jobs: 8 | test: 9 | name: running unittests 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v2 14 | - name: Use Node.js ${{ matrix.node-version }} 15 | uses: actions/setup-node@v1 16 | with: 17 | node-version: 12 18 | - run: npm install 19 | - run: npm test 20 | 21 | publish: 22 | needs: test 23 | runs-on: ubuntu-latest 24 | 25 | steps: 26 | - uses: actions/checkout@master 27 | - uses: actions/setup-node@v1 28 | with: 29 | node-version: 12 30 | registry-url: 'https://registry.npmjs.org' 31 | - run: npm i 32 | - run: npm publish --access public 33 | env: 34 | NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} 35 | -------------------------------------------------------------------------------- /.github/workflows/unittests.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Testing 5 | 6 | on: 7 | push: 8 | branches: [ master ] 9 | pull_request: 10 | branches: [ master ] 11 | 12 | jobs: 13 | test: 14 | name: running unittests 15 | runs-on: ubuntu-latest 16 | 17 | strategy: 18 | matrix: 19 | node-version: [10.x, 12.x] 20 | 21 | steps: 22 | - uses: actions/checkout@v2 23 | - name: Use Node.js ${{ matrix.node-version }} 24 | uses: actions/setup-node@v1 25 | with: 26 | node-version: ${{ matrix.node-version }} 27 | - run: npm install 28 | - run: npm test 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | build 3 | npm-debug.log 4 | .env 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | src 2 | node_modules 3 | package-lock.json 4 | yarn.lock 5 | tsconfig.json 6 | docs.json 7 | .eslintrc 8 | .editorconfig 9 | .npmignore 10 | .gitignore 11 | .gitattributes 12 | .github -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |

NovelCovid

3 |
(aka covidapi)
4 | A JavaScript Wrapper for the novelCOVID API

5 | 6 | ![GitHub top language](https://img.shields.io/github/languages/top/disease-sh/node-api) 7 | ![Snyk Vulnerabilities for npm scoped package](https://img.shields.io/snyk/vulnerabilities/npm/novelcovid) 8 | ![GitHub package.json version](https://img.shields.io/github/package-json/v/novelcovid/node-api) 9 | ![GitHub last commit](https://img.shields.io/github/last-commit/disease-sh/node-api)
10 | ![npm bundle size](https://img.shields.io/bundlephobia/minzip/novelcovid) 11 | ![npm](https://img.shields.io/npm/dw/novelcovid)
12 | ![GitHub issues](https://img.shields.io/github/issues-raw/disease-sh/node-api) 13 | ![License](https://img.shields.io/github/license/disease-sh/node-api) 14 | ![Profile visits](https://badges.pufler.dev/visits/disease-sh/node-api) 15 | 16 |
17 |
18 | 19 | ## Disclaimer 20 | This wrapper is only for COVID-19 related data from the [Open Disease API](https://disease.sh). 21 | 22 | ## Installation 23 | 24 | [![NPM](https://nodei.co/npm/novelcovid.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/novelcovid/) 25 | 26 | Using NPM: 27 | 28 | ```bash 29 | npm i -s novelcovid 30 | ``` 31 | 32 | ## Remarks 33 | 34 | This wrapper uses the '@aero/centra' package to send requests. 35 | It is way faster than any other request package other than 'http.request' package. 36 | 37 | The **allowNull** parameter is now available for the `all`, `countries`, `continents`, `states` and `gov` endpoints. 38 | 39 | ## Usage 40 | 41 | All shown examples use Promises but can also await/async to fetch data using NovelCovid. 42 | 43 | ### Add to project 44 | 45 | ```js 46 | const api = require('novelcovid'); 47 | 48 | // you can choose which URL to use, this will not change the behaviour of the API 49 | api.settings({ 50 | baseUrl: 'https://disease.sh' | 'https://api.caw.sh' | 'https://corona.lmao.ninja' 51 | }) 52 | ``` 53 | 54 | ### Summary 55 | 56 | ```js 57 | // this prints a summary of global data 58 | api.all().then(console.log) 59 | 60 | // this prints a summary of global data with yesterdays data 61 | api.yesterday.all().then(console.log) 62 | 63 | // this prints a summary of global data with data from two days ago 64 | api.twoDaysAgo.all().then(console.log) 65 | ``` 66 | 67 | ### Countries 68 | 69 | ```js 70 | // this prints an array of call infected countries 71 | api.countries().then(console.log) 72 | 73 | // this prints an array of call infected countries sorted by cases 74 | api.countries({sort:'cases'}).then(console.log) 75 | 76 | // this prints a specified country 77 | api.countries({country:'austria'}).then(console.log) 78 | 79 | // this prints an array of specified countries 80 | api.countries({country:['austria','china']}).then(console.log) 81 | ``` 82 | 83 | ### Yesterday (Countries) 84 | 85 | ```js 86 | // this prints an array of all infected countries with yesterdays data 87 | api.yesterday.countries().then(console.log) 88 | 89 | // this prints an array of all infected countries with yesterdays data sorted by todays cases 90 | api.yesterday.countries({sort:'cases'}).then(console.log) 91 | 92 | // this prints a specified country with yesterdays data 93 | api.yesterday.countries({country:'austria'}).then(console.log) 94 | 95 | // this prints an array of specified countries with yesterdays data 96 | api.yesterday.countries({country:['austria','china']}).then(console.log) 97 | ``` 98 | 99 | ### Two Days Ago (Countries) 100 | 101 | ```js 102 | // this prints an array of all infected countries with data from two days ago 103 | api.twoDaysAgo.countries().then(console.log) 104 | 105 | // this prints an array of all infected countries with data from two days ago sorted by todays cases 106 | api.twoDaysAgo.countries({sort:'cases'}).then(console.log) 107 | 108 | // this prints a specified country with data from two days ago 109 | api.twoDaysAgo.countries({country:'austria'}).then(console.log) 110 | 111 | // this prints an array of specified countries with data from two days ago 112 | api.twoDaysAgo.countries({country:['austria','china']}).then(console.log) 113 | ``` 114 | 115 | ### Continents 116 | 117 | ```js 118 | // this prints an array of all infected continents 119 | api.continents().then(console.log) 120 | 121 | // this prints an array of all infected continents sorted by cases 122 | api.continents({sort:'cases'}).then(console.log) 123 | 124 | // this prints a specified continent 125 | api.continents({continent:'europe'}).then(console.log) 126 | ``` 127 | 128 | ### Yesterday (Continents) 129 | 130 | ```js 131 | // this prints an array of all infected continents with yesterdays data 132 | api.yesterday.continents().then(console.log) 133 | 134 | // this prints an array of all infected continents with yesterdays data sorted by todays cases 135 | api.yesterday.continents({sort:'cases'}).then(console.log) 136 | 137 | // this prints a specified continent with yesterdays data 138 | api.yesterday.continents({continent:'europe'}).then(console.log) 139 | ``` 140 | 141 | ### Two Days Ago (Continents) 142 | 143 | ```js 144 | // this prints an array of all infected continents with data from two days ago 145 | api.twoDaysAgo.continents().then(console.log) 146 | 147 | // this prints an array of all infected continents with data from two days ago sorted by todays cases 148 | api.twoDaysAgo.continents({sort:'cases'}).then(console.log) 149 | 150 | // this prints a specified continent with data from two days ago 151 | api.twoDaysAgo.continents({continent:'europe'}).then(console.log) 152 | ``` 153 | 154 | ### States 155 | 156 | ```js 157 | // this prints an array of US states and their data 158 | api.states().then(console.log) 159 | 160 | // this prints an array of US states and their data sorted by cases 161 | api.states({sort:'cases'}).then(console.log) 162 | 163 | // this prints a specified state and its data 164 | api.states({state:'michigan'}).then(console.log) 165 | 166 | // this prints an array of specified states and their data 167 | api.states({state:['michigan','new york']}).then(console.log) 168 | ``` 169 | 170 | ### Yesterday (States) 171 | 172 | ```js 173 | // this prints an array of US states with yesterdays data 174 | api.yesterday.states().then(console.log) 175 | 176 | // this prints an array of US states with yesterdays data sorted by cases 177 | api.yesterday.states({sort:'cases'}).then(console.log) 178 | 179 | // this prints a specified state with yesterdays data 180 | api.yesterday.states({state:'michigan'}).then(console.log) 181 | 182 | // this prints an array of specified states with yesterdays data 183 | api.yesterday.states({state:['michigan','new york']}).then(console.log) 184 | ``` 185 | 186 | ### JHUCSSE 187 | 188 | ```js 189 | // this prints an array of infected countries 190 | api.jhucsse.all().then(console.log) 191 | 192 | // this prints an array of infected US counties 193 | api.jhucsse.counties().then(console.log) 194 | 195 | // this prints an array of infected provinces of a specified US county 196 | api.jhucsse.counties({county:'abbeville'}).then(console.log) 197 | 198 | // this prints an object with the counties provinces as arrays 199 | api.jhucsse.counties({county:['abbeville','acadia']}).then(console.log) 200 | ``` 201 | 202 | ### Historical 203 | 204 | ```js 205 | // this prints the global timeline 206 | api.historical.all().then(console.log) 207 | 208 | // this prints the global timeline for the last 10 days (use -1 to get all data) 209 | api.historical.all().then(console.log) 210 | 211 | // this prints an array of infected countries and their timeline 212 | api.historical.countries().then(console.log) 213 | 214 | // this prints a specified country and its timeline 215 | api.historical.countries({country:'china'}).then(console.log) 216 | 217 | // this prints a specified country and its timeline for the last 10 days (use -1 to get all data) 218 | api.historical.countries({country:'china', days:10}).then(console.log) 219 | 220 | // this prints a specified province of a specified country and its timeline 221 | api.historical.countries({country:'china', province:'hubei'}).then(console.log) 222 | 223 | // this prints a specified province of a specified country and its timeline 224 | api.historical.countries({country:'china', province:['hubei','anhui']}).then(console.log) 225 | ``` 226 | 227 | ### New York Times Data (USA) 228 | 229 | ```js 230 | // this prints a timeline of data from the US 231 | api.nyt.usa().then(console.log) 232 | 233 | // this prints an array of timelines of all infected US states 234 | api.nyt.states().then(console.log) 235 | 236 | // this prints a timeline of a specified US state 237 | api.nyt.states({state:'illinois'}).then(console.log) 238 | 239 | // this prints an array of timelines all infected US counties 240 | api.nyt.counties().then(console.log) 241 | 242 | // this prints an array of timelines of states of a specified US county 243 | api.nyt.counties({county:'cook'}).then(console.log) 244 | ``` 245 | 246 | ### Mobility Data (Apple) 247 | 248 | ```js 249 | // this prints a list of available country names 250 | api.apple.countries().then(console.log) 251 | 252 | // this prints a list of available subregions for a specified country 253 | api.apple.subregions('austria').then(console.log) 254 | 255 | // this prints mobility data for a specified subregion of a country, all is used to query total data 256 | api.apple.mobilityData({country:'austria', subregion:'all'}).then(console.log) 257 | 258 | // this prints mobility data for multiple specified subregions of a country 259 | api.apple.mobilityData({country:'austria', subregion:['vienna', 'salzburg']}).then(console.log) 260 | ``` 261 | 262 | ### Official Government Data 263 | 264 | ```js 265 | // this prints a list of available country names 266 | api.gov().then(console.log) 267 | 268 | // this prints the data for a specified country 269 | api.gov('austria').then(console.log) 270 | ``` 271 | -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Specify settings to the wrapper 3 | * @param {object} opts object holding the options 4 | * @param {string} opts.baseUrl url to use for requests 5 | */ 6 | export function settings(opts?: { 7 | baseUrl: string; 8 | }): string | false; 9 | /** 10 | * Retrieve a summary of global data 11 | * @param {object} opts object holding the options for that request 12 | * @param {boolean} opts.allowNull whether to allow null values (true) or automatically transform them to 0 (false) 13 | * @returns {object} summary object 14 | */ 15 | export function all(opts?: { 16 | allowNull: boolean; 17 | }): Promise; 18 | /** 19 | * Retrieve country specific data 20 | * @param {object} opts object holding the options for that request 21 | * @param {string|string[]} opts.country country name/s to be queried 22 | * @param {boolean} opts.allowNull whether to allow null values (true) or automatically transform them to 0 (false) 23 | * @param {string} opts.sort property name which will be used for sorting 24 | * @param {boolean} opts.strict whether to use strict name checking or not 25 | * @returns {object|object[]} country specific data 26 | */ 27 | export function countries(opts?: { 28 | country: string | string[]; 29 | allowNull: boolean; 30 | sort: string; 31 | strict: boolean; 32 | }): Promise | Promise; 33 | /** 34 | * Retrieve continent specific data 35 | * @param {object} opts object holding the options for that request 36 | * @param {string|string[]} opts.continent continent name/s to be queried 37 | * @param {boolean} opts.allowNull whether to allow null values (true) or automatically transform them to 0 (false) 38 | * @param {string} opts.sort property name which will be used for sorting 39 | * @param {boolean} opts.strict whether to use strict name checking or not 40 | * @returns {object|object[]} continent specific data 41 | */ 42 | export function continents(opts?: { 43 | continent: string | string[]; 44 | allowNull: boolean; 45 | sort: string; 46 | strict: boolean; 47 | }): Promise | Promise; 48 | /** 49 | * Retrieve state specific data 50 | * @param {object} opts object holding the options for that request 51 | * @param {string|string[]} opts.state state name/s to be queried 52 | * @param {boolean} opts.allowNull whether to allow null values (true) or automatically transform them to 0 (false) 53 | * @param {string} opts.sort property name which will be used for sorting 54 | * @param {boolean} opts.strict whether to use strict name checking or not 55 | * @returns {object|object[]} state specific data 56 | */ 57 | export function states(opts?: { 58 | state: string | string[]; 59 | allowNull: boolean; 60 | sort: string; 61 | strict: boolean; 62 | }): Promise | Promise; 63 | export namespace yesterday { 64 | export function all(opts?: { 65 | allowNull: boolean; 66 | }): Promise; 67 | export function countries(opts?: { 68 | country: string | string[]; 69 | allowNull: boolean; 70 | sort: string; 71 | strict: boolean; 72 | }): Promise | Promise; 73 | export function continents(opts?: { 74 | continent: string | string[]; 75 | sort: string; 76 | strict: boolean; 77 | }): Promise | Promise; 78 | export function states(opts?: { 79 | state: string | string[]; 80 | allowNull: boolean; 81 | sort: string; 82 | strict: boolean; 83 | }): Promise | Promise; 84 | } 85 | export namespace jhucsse { 86 | export function all(): Promise; 87 | export function counties(opts?: { 88 | county: string | string[]; 89 | }): Promise | Promise; 90 | } 91 | export namespace historical { 92 | export function all(opts?: { 93 | days: string | number; 94 | }): Promise; 95 | export function countries(opts?: { 96 | country: string | string[]; 97 | province: string | string[]; 98 | days: string | number; 99 | }): Promise; 100 | } 101 | export namespace nyt { 102 | export function usa(): Promise; 103 | export function states(opts?: { 104 | state: string; 105 | }): Promise | Promise; 106 | export function counties(opts?: { 107 | county: string; 108 | }): Promise | Promise; 109 | } 110 | export namespace apple { 111 | export function countries(): Promise; 112 | export function subregions(country: string): Promise; 113 | export function mobilityData(opts?: { 114 | country: string; 115 | subregion: string | string[]; 116 | }): Promise | Promise; 117 | } 118 | /** 119 | * Retrieve official government data 120 | * @param {string} country country name to be queried (empty to get an array of names) 121 | * @param {boolean} opts.allowNull whether to allow null values (true) or automatically transform them to 0 (false) 122 | * @returns {object} official government data 123 | */ 124 | export function gov(country: string): Promise; 125 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const fetch = require('@aero/centra'), 2 | curSettings = { baseUrl: 'https://disease.sh' }, 3 | fetchJson = (path) => fetch(`${curSettings.baseUrl}/${path}`).json(), 4 | yesterday = {}, twoDaysAgo = {}, jhucsse = {}, historical = {}, nyt = {}, apple = {} 5 | 6 | const createPath = (opts, path) => { 7 | if(opts.sort || String(opts.strict) !== 'undefined' || opts.yesterday || String(opts.allowNull) !== 'undefined') { 8 | path += '?' 9 | if(opts.sort) 10 | path += `sort=${opts.sort}` 11 | if(opts.yesterday) 12 | path += (opts.sort ?'&':'')+'yesterday='+opts.yesterday 13 | if(opts.twoDaysAgo) 14 | path += (opts.sort || opts.yesterday ?'&':'')+'twoDaysAgo='+opts.twoDaysAgo 15 | if(String(opts.allowNull) !== 'undefined') 16 | path += (opts.sort || opts.yesterday || opts.twoDaysAgo ?'&':'')+'allowNull='+opts.allowNull 17 | if(String(opts.strict) !== 'undefined') 18 | path += (opts.sort || opts.yesterday || opts.twoDaysAgo || String(opts.allowNull) !== 'undefined' ?'&':'')+'strict='+opts.strict 19 | } 20 | return path 21 | } 22 | const _all = (opts) => fetchJson(createPath(opts, `v3/covid-19/all`)) 23 | 24 | /** 25 | * Specify settings to the wrapper 26 | * @param {object} opts object holding the options 27 | * @param {string} opts.baseUrl url to use for requests 28 | */ 29 | const settings = (opts = {}) => (curSettings.baseUrl = opts.baseUrl) 30 | 31 | /** 32 | * Retrieve a summary of global data 33 | * @param {object} opts object holding the options for that request 34 | * @param {boolean} opts.allowNull whether to allow null values (true) or automatically transform them to 0 (false) 35 | * @returns {object} summary object 36 | */ 37 | const all = (opts = {}) => _all({...opts, yesterday: false}) 38 | 39 | /** 40 | * Retrieve country specific data 41 | * @param {object} opts object holding the options for that request 42 | * @param {string|string[]} opts.country country name/s to be queried 43 | * @param {boolean} opts.allowNull whether to allow null values (true) or automatically transform them to 0 (false) 44 | * @param {string} opts.sort property name which will be used for sorting 45 | * @param {boolean} opts.strict whether to use strict name checking or not 46 | * @returns {object|object[]} country specific data 47 | */ 48 | const countries = (opts = {}) => { 49 | let path = 'v3/covid-19/countries' 50 | if(opts.country) 51 | path += `/${Array.isArray(opts.country) ? (opts.country.join('|')) : opts.country}` 52 | return fetchJson(createPath(opts, path)) 53 | } 54 | 55 | /** 56 | * Retrieve continent specific data 57 | * @param {object} opts object holding the options for that request 58 | * @param {string|string[]} opts.continent continent name/s to be queried 59 | * @param {boolean} opts.allowNull whether to allow null values (true) or automatically transform them to 0 (false) 60 | * @param {string} opts.sort property name which will be used for sorting 61 | * @param {boolean} opts.strict whether to use strict name checking or not 62 | * @returns {object|object[]} continent specific data 63 | */ 64 | const continents = (opts = {}) => { 65 | let path = 'v3/covid-19/continents' 66 | if(opts.continent) 67 | path += `/${opts.continent}` 68 | return fetchJson(createPath(opts, path)) 69 | } 70 | 71 | /** 72 | * Retrieve state specific data 73 | * @param {object} opts object holding the options for that request 74 | * @param {string|string[]} opts.state state name/s to be queried 75 | * @param {boolean} opts.allowNull whether to allow null values (true) or automatically transform them to 0 (false) 76 | * @param {string} opts.sort property name which will be used for sorting 77 | * @param {boolean} opts.strict whether to use strict name checking or not 78 | * @returns {object|object[]} state specific data 79 | */ 80 | const states = (opts = {}) => { 81 | let path = 'v3/covid-19/states' 82 | if(opts.state) 83 | path += `/${Array.isArray(opts.state) ? (opts.state.join('|')) : opts.state}` 84 | return fetchJson(createPath(opts, path)) 85 | } 86 | 87 | /** 88 | * Retrieve a summary of yesterdays global data 89 | * @param {object} opts object holding the options for that request 90 | * @param {boolean} opts.allowNull whether to allow null values (true) or automatically transform them to 0 (false) 91 | * @returns {object} summary object 92 | */ 93 | yesterday.all = (opts = {}) => _all({...opts, yesterday: true}) 94 | 95 | /** 96 | * Retrieve yesterdays country specific data 97 | * @param {object} opts object holding the options for that request 98 | * @param {string|string[]} opts.country country name/s to be queried 99 | * @param {boolean} opts.allowNull whether to allow null values (true) or automatically transform them to 0 (false) 100 | * @param {string} opts.sort property name which will be used for sorting 101 | * @param {boolean} opts.strict whether to use strict name checking or not 102 | * @returns {object|object[]} country specific data 103 | */ 104 | yesterday.countries = (opts = {}) => countries({...opts, yesterday: true}) 105 | 106 | /** 107 | * Retrieve yesterdays continent specific data 108 | * @param {object} opts object holding the options for that request 109 | * @param {string|string[]} opts.continent continent name/s to be queried 110 | * @param {string} opts.sort property name which will be used for sorting 111 | * @param {boolean} opts.strict whether to use strict name checking or not 112 | * @returns {object|object[]} continent specific data 113 | */ 114 | yesterday.continents = (opts = {}) => continents({...opts, yesterday: true}) 115 | 116 | /** 117 | * Retrieve yesterdays state specific data 118 | * @param {object} opts object holding the options for that request 119 | * @param {string|string[]} opts.state state name/s to be queried 120 | * @param {boolean} opts.allowNull whether to allow null values (true) or automatically transform them to 0 (false) 121 | * @param {string} opts.sort property name which will be used for sorting 122 | * @param {boolean} opts.strict whether to use strict name checking or not 123 | * @returns {object|object[]} state specific data 124 | */ 125 | yesterday.states = (opts = {}) => states({...opts, yesterday: true}) 126 | 127 | /** 128 | * Retrieve a summary of global data from two days ago 129 | * @param {object} opts object holding the options for that request 130 | * @param {boolean} opts.allowNull whether to allow null values (true) or automatically transform them to 0 (false) 131 | * @returns {object} summary object 132 | */ 133 | twoDaysAgo.all = (opts = {}) => _all({...opts, twoDaysAgo: true}) 134 | 135 | /** 136 | * Retrieve country specific data from two days ago 137 | * @param {object} opts object holding the options for that request 138 | * @param {string|string[]} opts.country country name/s to be queried 139 | * @param {boolean} opts.allowNull whether to allow null values (true) or automatically transform them to 0 (false) 140 | * @param {string} opts.sort property name which will be used for sorting 141 | * @param {boolean} opts.strict whether to use strict name checking or not 142 | * @returns {object|object[]} country specific data 143 | */ 144 | twoDaysAgo.countries = (opts = {}) => countries({...opts, twoDaysAgo: true}) 145 | 146 | /** 147 | * Retrieve continent specific data from two days ago 148 | * @param {object} opts object holding the options for that request 149 | * @param {string|string[]} opts.continent continent name/s to be queried 150 | * @param {string} opts.sort property name which will be used for sorting 151 | * @param {boolean} opts.strict whether to use strict name checking or not 152 | * @returns {object|object[]} continent specific data 153 | */ 154 | twoDaysAgo.continents = (opts = {}) => continents({...opts, twoDaysAgo: true}) 155 | 156 | /** 157 | * Retrieve an array of infected countries 158 | * @returns {object[]} array of infected countries 159 | */ 160 | jhucsse.all = () => fetchJson('v3/covid-19/jhucsse') 161 | 162 | /** 163 | * Retrieve county specific data 164 | * @param {object} opts object holding the options for that request 165 | * @param {string|string[]} opts.county county name/s to be queried 166 | * @returns {object|object[]} county specific data 167 | */ 168 | jhucsse.counties = (opts = {}) => { 169 | let path = 'v3/covid-19/jhucsse/counties' 170 | if(opts.county) 171 | path += `/${Array.isArray(opts.county) ? (opts.county.join('|')) : opts.county}` 172 | return fetchJson(path) 173 | } 174 | 175 | /** 176 | * Retrieve an array of the global timeline 177 | * @param {object} opts object holding the options for that request 178 | * @param {string|number} opts.days the number of days to get data for, or 'all' 179 | * @returns {object[]} timeline data 180 | */ 181 | historical.all = (opts = {}) => fetchJson(`v3/covid-19/historical/all${opts.days ? `?lastdays=${opts.days}`:''}`) 182 | 183 | /** 184 | * Retrieve an array of the country specific timelines 185 | * @param {object} opts object holding the options for that request 186 | * @param {string|string[]} opts.country country name/s to be queried 187 | * @param {string|string[]} opts.province province name/s to be queried (must have 1 country) 188 | * @param {string|number} opts.days the number of days to get data for, or 'all' 189 | * @returns {object[]} timeline data 190 | */ 191 | historical.countries = (opts = {}) => { 192 | let path = 'v3/covid-19/historical' 193 | if(opts.country) { 194 | path += `/${Array.isArray(opts.country) ? (opts.country.join('|')) : opts.country}` 195 | if(opts.province) 196 | path += `/${Array.isArray(opts.province) ? (opts.province.join('|')) : opts.province}` 197 | if(opts.days) 198 | path += `?lastdays=${opts.days}` 199 | } 200 | return fetchJson(path) 201 | } 202 | 203 | /** 204 | * Retrieve a timeline of USA data 205 | * @returns {object[]} USA timeline data 206 | */ 207 | nyt.usa = () => fetchJson('v3/covid-19/nyt/usa') 208 | 209 | /** 210 | * Retrieve a timeline of US state specific data 211 | * @param {object} opts object holding the options for that request 212 | * @param {string} opts.state state name to be queried 213 | * @returns {object|object[]} state specific timeline data 214 | */ 215 | nyt.states = (opts = {}) => { 216 | let path = 'v3/covid-19/nyt/states' 217 | if(opts.state) 218 | path += `/${opts.state}` 219 | return fetchJson(path) 220 | } 221 | 222 | /** 223 | * Retrieve a timeline of US county specific data 224 | * @param {object} opts object holding the options for that request 225 | * @param {string} opts.county county name to be queried 226 | * @returns {object|object[]} county specific timeline data 227 | */ 228 | nyt.counties = (opts = {}) => { 229 | let path = 'v3/covid-19/nyt/counties' 230 | if(opts.county) 231 | path += `/${opts.county}` 232 | return fetchJson(path) 233 | } 234 | 235 | /** 236 | * Retrieve an array of available countries 237 | * @returns {string[]} country names 238 | */ 239 | apple.countries = () => fetchJson('v3/covid-19/apple/countries') 240 | 241 | /** 242 | * Retrieve a list of available subregions for a country 243 | * @param {string} country country name to be queried 244 | * @returns {object} object containing country name and list of subregions 245 | */ 246 | apple.subregions = (country) => fetchJson(`v3/covid-19/apple/countries/${country}`) 247 | 248 | /** 249 | * Retrieve mobility data for a specific country and subregion 250 | * @param {object} opts object holding the options for that request 251 | * @param {string} opts.country country name to be queried 252 | * @param {string|string[]} opts.subregion subregion name/s to be queried 253 | * @returns {object|object[]} mobility data 254 | */ 255 | apple.mobilityData = (opts = {}) => { 256 | let path = 'v3/covid-19/apple/countries' 257 | if(opts.country) { 258 | path += `/${opts.country}` 259 | if(opts.subregion) 260 | path += `/${Array.isArray(opts.subregion) ? (opts.subregion.join('|')) : opts.subregion}` 261 | } 262 | return fetchJson(path) 263 | } 264 | 265 | /** 266 | * Retrieve official government data 267 | * @param {string} country country name to be queried (empty to get an array of names) 268 | * @param {boolean} opts.allowNull whether to allow null values (true) or automatically transform them to 0 (false) 269 | * @returns {object} official government data 270 | */ 271 | const gov = (country) => fetchJson(`v3/covid-19/gov/${country ? country : ''}`) 272 | 273 | module.exports = { 274 | settings, 275 | all, 276 | countries, 277 | continents, 278 | states, 279 | yesterday, 280 | twoDaysAgo, 281 | jhucsse, 282 | historical, 283 | nyt, 284 | apple, 285 | gov 286 | } 287 | -------------------------------------------------------------------------------- /index.spec.js: -------------------------------------------------------------------------------- 1 | const api = require('./') 2 | const should = require('chai').should() 3 | 4 | //api.settings({baseUrl: 'http://localhost:3000'}) 5 | 6 | describe('DEFAULT', function () { 7 | it('/all', async function () { 8 | const data = await api.all() 9 | data.should.be.a('object') 10 | data.should.have.property('cases') 11 | data.should.have.property('todayCases') 12 | data.should.have.property('deaths') 13 | data.should.have.property('todayDeaths') 14 | data.should.have.property('recovered') 15 | data.should.have.property('critical') 16 | data.should.have.property('tests') 17 | data.should.have.property('casesPerOneMillion') 18 | data.should.have.property('deathsPerOneMillion') 19 | data.should.have.property('testsPerOneMillion') 20 | data.should.have.property('updated') 21 | data.should.have.property('affectedCountries') 22 | }) 23 | 24 | it('/states', async function () { 25 | const data = await api.states() 26 | data.should.be.a('array') 27 | for(let row of data) { 28 | row.should.have.property('state') 29 | row.should.have.property('cases') 30 | row.should.have.property('todayCases') 31 | row.should.have.property('deaths') 32 | row.should.have.property('todayDeaths') 33 | row.should.have.property('active') 34 | } 35 | }) 36 | 37 | it('/states?sort=cases', async function () { 38 | const data = await api.states({sort:'cases'}) 39 | data.should.be.a('array') 40 | let maxCases = 999999999; 41 | for(let row of data) { 42 | row.should.have.property('state') 43 | row.should.have.property('cases') 44 | row.cases.should.be.at.most(maxCases); 45 | maxCases = row.cases; 46 | row.should.have.property('todayCases') 47 | row.should.have.property('deaths') 48 | row.should.have.property('todayDeaths') 49 | row.should.have.property('active') 50 | } 51 | }) 52 | 53 | it('/states/michigan', async function () { 54 | const data = await api.states({state:'michigan'}) 55 | data.should.be.a('object') 56 | data.should.have.property('state', 'Michigan') 57 | data.should.have.property('cases') 58 | data.should.have.property('todayCases') 59 | data.should.have.property('deaths') 60 | data.should.have.property('todayDeaths') 61 | data.should.have.property('active') 62 | }) 63 | 64 | it('/states/michigan|new%20york', async function () { 65 | const data = await api.states({state:['michigan', 'new york']}) 66 | data.should.be.a('array').of.length(2) 67 | data[0].should.have.property('state', 'Michigan') 68 | data[1].should.have.property('state', 'New York') 69 | for(let row of data){ 70 | row.should.have.property('cases') 71 | row.should.have.property('todayCases') 72 | row.should.have.property('deaths') 73 | row.should.have.property('todayDeaths') 74 | row.should.have.property('active') 75 | } 76 | }) 77 | 78 | it('/countries', async function() { 79 | const data = await api.countries() 80 | data.should.be.a('array') 81 | for(let row of data) { 82 | row.should.have.property('country') 83 | row.should.have.property('countryInfo') 84 | row.countryInfo.should.have.property('_id') 85 | row.countryInfo.should.have.property('iso2') 86 | row.countryInfo.should.have.property('iso3') 87 | row.countryInfo.should.have.property('lat') 88 | row.countryInfo.should.have.property('long') 89 | row.countryInfo.should.have.property('flag') 90 | row.should.have.property('cases') 91 | row.should.have.property('todayCases') 92 | row.should.have.property('deaths') 93 | row.should.have.property('todayDeaths') 94 | row.should.have.property('recovered') 95 | row.should.have.property('active') 96 | row.should.have.property('critical') 97 | row.should.have.property('casesPerOneMillion') 98 | row.should.have.property('deathsPerOneMillion') 99 | row.should.have.property('updated') 100 | } 101 | }) 102 | 103 | it('/countries?sort=cases', async function() { 104 | const data = await api.countries({sort:'cases'}) 105 | data.should.be.a('array') 106 | let maxCases = 999999999; 107 | for(let row of data) { 108 | row.should.have.property('country') 109 | row.should.have.property('countryInfo') 110 | row.countryInfo.should.have.property('_id') 111 | row.countryInfo.should.have.property('iso2') 112 | row.countryInfo.should.have.property('iso3') 113 | row.countryInfo.should.have.property('lat') 114 | row.countryInfo.should.have.property('long') 115 | row.countryInfo.should.have.property('flag') 116 | row.should.have.property('cases') 117 | row.cases.should.be.at.most(maxCases); 118 | maxCases = row.cases; 119 | row.should.have.property('todayCases') 120 | row.should.have.property('deaths') 121 | row.should.have.property('todayDeaths') 122 | row.should.have.property('recovered') 123 | row.should.have.property('active') 124 | row.should.have.property('critical') 125 | row.should.have.property('casesPerOneMillion') 126 | row.should.have.property('deathsPerOneMillion') 127 | row.should.have.property('updated') 128 | } 129 | }) 130 | 131 | it('/countries/austria', async function() { 132 | const data = await api.countries({country:'austria'}) 133 | data.should.be.a('object') 134 | data.should.have.property('country', 'Austria') 135 | data.should.have.property('countryInfo') 136 | data.countryInfo.should.have.property('_id', 40) 137 | data.countryInfo.should.have.property('iso2') 138 | data.countryInfo.should.have.property('iso3') 139 | data.countryInfo.should.have.property('lat') 140 | data.countryInfo.should.have.property('long') 141 | data.countryInfo.should.have.property('flag') 142 | data.should.have.property('cases') 143 | data.should.have.property('todayCases') 144 | data.should.have.property('deaths') 145 | data.should.have.property('todayDeaths') 146 | data.should.have.property('recovered') 147 | data.should.have.property('active') 148 | data.should.have.property('critical') 149 | data.should.have.property('casesPerOneMillion') 150 | data.should.have.property('deathsPerOneMillion') 151 | data.should.have.property('updated') 152 | }) 153 | 154 | it('/countries/netherlands',async function () { 155 | const data = await api.countries({country:'netherlands'}) 156 | data.should.be.a('object') 157 | data.should.have.property('country', 'Netherlands') 158 | data.should.have.property('countryInfo') 159 | data.countryInfo.should.have.property('_id') 160 | data.countryInfo.should.have.property('iso2') 161 | data.countryInfo.should.have.property('iso3') 162 | data.countryInfo.should.have.property('lat') 163 | data.countryInfo.should.have.property('long') 164 | data.countryInfo.should.have.property('flag') 165 | data.should.have.property('cases') 166 | data.should.have.property('todayCases') 167 | data.should.have.property('deaths') 168 | data.should.have.property('todayDeaths') 169 | data.should.have.property('recovered') 170 | data.should.have.property('active') 171 | data.should.have.property('critical') 172 | data.should.have.property('casesPerOneMillion') 173 | data.should.have.property('deathsPerOneMillion') 174 | data.should.have.property('updated') 175 | }) 176 | 177 | it('/countries/netherlands?strict=false',async function () { 178 | const data = await api.countries({country:'netherlands', strict:false}) 179 | data.should.be.a('object') 180 | data.should.have.property('country', 'Caribbean Netherlands') 181 | data.should.have.property('countryInfo') 182 | data.countryInfo.should.have.property('_id') 183 | data.countryInfo.should.have.property('iso2') 184 | data.countryInfo.should.have.property('iso3') 185 | data.countryInfo.should.have.property('lat') 186 | data.countryInfo.should.have.property('long') 187 | data.countryInfo.should.have.property('flag') 188 | data.should.have.property('cases') 189 | data.should.have.property('todayCases') 190 | data.should.have.property('deaths') 191 | data.should.have.property('todayDeaths') 192 | data.should.have.property('recovered') 193 | data.should.have.property('active') 194 | data.should.have.property('critical') 195 | data.should.have.property('casesPerOneMillion') 196 | data.should.have.property('deathsPerOneMillion') 197 | data.should.have.property('updated') 198 | }) 199 | 200 | it('/countries/austria|usa', async function() { 201 | const data = await api.countries({country:['austria', 'usa']}) 202 | data.should.be.a('array').of.length(2) 203 | data[0].should.have.property('country', 'Austria') 204 | data[1].should.have.property('country', 'USA') 205 | for(let row of data){ 206 | row.should.have.property('countryInfo') 207 | row.countryInfo.should.have.property('_id') 208 | row.countryInfo.should.have.property('iso2') 209 | row.countryInfo.should.have.property('iso3') 210 | row.countryInfo.should.have.property('lat') 211 | row.countryInfo.should.have.property('long') 212 | row.countryInfo.should.have.property('flag') 213 | row.should.have.property('cases') 214 | row.should.have.property('todayCases') 215 | row.should.have.property('deaths') 216 | row.should.have.property('todayDeaths') 217 | row.should.have.property('recovered') 218 | row.should.have.property('active') 219 | row.should.have.property('critical') 220 | row.should.have.property('casesPerOneMillion') 221 | row.should.have.property('deathsPerOneMillion') 222 | row.should.have.property('updated') 223 | } 224 | }) 225 | 226 | it('/continents', async function() { 227 | const data = await api.continents() 228 | data.should.be.a('array') 229 | for(let row of data) { 230 | row.should.have.property('continent') 231 | row.should.have.property('cases') 232 | row.should.have.property('todayCases') 233 | row.should.have.property('deaths') 234 | row.should.have.property('todayDeaths') 235 | row.should.have.property('recovered') 236 | row.should.have.property('active') 237 | row.should.have.property('critical') 238 | row.should.have.property('updated') 239 | } 240 | }) 241 | 242 | it('/continents/europe', async function() { 243 | const data = await api.continents({continent:'europe'}) 244 | data.should.be.a('object') 245 | data.should.have.property('continent', 'Europe') 246 | data.should.have.property('cases') 247 | data.should.have.property('todayCases') 248 | data.should.have.property('deaths') 249 | data.should.have.property('todayDeaths') 250 | data.should.have.property('recovered') 251 | data.should.have.property('active') 252 | data.should.have.property('critical') 253 | data.should.have.property('updated') 254 | }) 255 | 256 | it('/continents/euro?strict=false', async function() { 257 | const data = await api.continents({continent:'europe', strict:false}) 258 | data.should.be.a('object') 259 | data.should.have.property('continent', 'Europe') 260 | data.should.have.property('cases') 261 | data.should.have.property('todayCases') 262 | data.should.have.property('deaths') 263 | data.should.have.property('todayDeaths') 264 | data.should.have.property('recovered') 265 | data.should.have.property('active') 266 | data.should.have.property('critical') 267 | data.should.have.property('updated') 268 | }) 269 | 270 | it('/yesterday',async function () { 271 | const data = await api.yesterday.countries() 272 | data.should.be.a('array') 273 | for(let row of data) { 274 | row.should.have.property('country') 275 | row.should.have.property('countryInfo') 276 | row.countryInfo.should.have.property('_id') 277 | row.countryInfo.should.have.property('iso2') 278 | row.countryInfo.should.have.property('iso3') 279 | row.countryInfo.should.have.property('lat') 280 | row.countryInfo.should.have.property('long') 281 | row.countryInfo.should.have.property('flag') 282 | row.should.have.property('cases') 283 | row.should.have.property('todayCases') 284 | row.should.have.property('deaths') 285 | row.should.have.property('todayDeaths') 286 | row.should.have.property('recovered') 287 | row.should.have.property('active') 288 | row.should.have.property('critical') 289 | row.should.have.property('casesPerOneMillion') 290 | row.should.have.property('deathsPerOneMillion') 291 | row.should.have.property('updated') 292 | } 293 | }) 294 | 295 | it('/yesterday?sort=cases', async function() { 296 | const data = await api.yesterday.countries({sort:'cases'}) 297 | data.should.be.a('array') 298 | let maxCases = 999999999; 299 | for(let row of data) { 300 | row.should.have.property('country') 301 | row.should.have.property('countryInfo') 302 | row.countryInfo.should.have.property('_id') 303 | row.countryInfo.should.have.property('iso2') 304 | row.countryInfo.should.have.property('iso3') 305 | row.countryInfo.should.have.property('lat') 306 | row.countryInfo.should.have.property('long') 307 | row.countryInfo.should.have.property('flag') 308 | row.should.have.property('cases') 309 | row.cases.should.be.at.most(maxCases); 310 | maxCases = row.cases; 311 | row.should.have.property('todayCases') 312 | row.should.have.property('deaths') 313 | row.should.have.property('todayDeaths') 314 | row.should.have.property('recovered') 315 | row.should.have.property('active') 316 | row.should.have.property('critical') 317 | row.should.have.property('casesPerOneMillion') 318 | row.should.have.property('deathsPerOneMillion') 319 | row.should.have.property('updated') 320 | } 321 | }) 322 | 323 | it('/yesterday/all', async function () { 324 | const data = await api.yesterday.all() 325 | const data2 = await api.all() 326 | data.should.be.a('object') 327 | data.should.have.property('cases') 328 | data2.should.have.property('cases') 329 | data.cases.should.be.at.most(data2.cases) 330 | data.should.have.property('todayCases') 331 | data.should.have.property('deaths') 332 | data.should.have.property('todayDeaths') 333 | data.should.have.property('recovered') 334 | data.should.have.property('critical') 335 | data.should.have.property('casesPerOneMillion') 336 | data.should.have.property('deathsPerOneMillion') 337 | data.should.have.property('updated') 338 | data.should.have.property('affectedCountries') 339 | }) 340 | 341 | it('/yesterday/austria',async function () { 342 | const data = await api.yesterday.countries({country:'austria'}) 343 | data.should.be.a('object') 344 | data.should.have.property('country', 'Austria') 345 | data.should.have.property('countryInfo') 346 | data.countryInfo.should.have.property('_id', 40) 347 | data.countryInfo.should.have.property('iso2') 348 | data.countryInfo.should.have.property('iso3') 349 | data.countryInfo.should.have.property('lat') 350 | data.countryInfo.should.have.property('long') 351 | data.countryInfo.should.have.property('flag') 352 | data.should.have.property('cases') 353 | data.should.have.property('todayCases') 354 | data.should.have.property('deaths') 355 | data.should.have.property('todayDeaths') 356 | data.should.have.property('recovered') 357 | data.should.have.property('active') 358 | data.should.have.property('critical') 359 | data.should.have.property('casesPerOneMillion') 360 | data.should.have.property('deathsPerOneMillion') 361 | data.should.have.property('updated') 362 | }) 363 | 364 | it('/yesterday/netherlands?strict=true',async function () { 365 | const data = await api.yesterday.countries({country:'netherlands', strict:true}) 366 | data.should.be.a('object') 367 | data.should.have.property('country', 'Netherlands') 368 | data.should.have.property('countryInfo') 369 | data.countryInfo.should.have.property('_id') 370 | data.countryInfo.should.have.property('iso2') 371 | data.countryInfo.should.have.property('iso3') 372 | data.countryInfo.should.have.property('lat') 373 | data.countryInfo.should.have.property('long') 374 | data.countryInfo.should.have.property('flag') 375 | data.should.have.property('cases') 376 | data.should.have.property('todayCases') 377 | data.should.have.property('deaths') 378 | data.should.have.property('todayDeaths') 379 | data.should.have.property('recovered') 380 | data.should.have.property('active') 381 | data.should.have.property('critical') 382 | data.should.have.property('casesPerOneMillion') 383 | data.should.have.property('deathsPerOneMillion') 384 | data.should.have.property('updated') 385 | }) 386 | 387 | it('/yesterday/austria|usa',async function () { 388 | const data = await api.yesterday.countries({country:['austria', 'usa']}) 389 | data.should.be.a('array').of.length(2) 390 | data[0].should.have.property('country', 'Austria') 391 | data[1].should.have.property('country', 'USA') 392 | for(let row of data){ 393 | row.should.have.property('countryInfo') 394 | row.countryInfo.should.have.property('_id') 395 | row.countryInfo.should.have.property('iso2') 396 | row.countryInfo.should.have.property('iso3') 397 | row.countryInfo.should.have.property('lat') 398 | row.countryInfo.should.have.property('long') 399 | row.countryInfo.should.have.property('flag') 400 | row.should.have.property('cases') 401 | row.should.have.property('todayCases') 402 | row.should.have.property('deaths') 403 | row.should.have.property('todayDeaths') 404 | row.should.have.property('recovered') 405 | row.should.have.property('active') 406 | row.should.have.property('critical') 407 | row.should.have.property('casesPerOneMillion') 408 | row.should.have.property('deathsPerOneMillion') 409 | row.should.have.property('updated') 410 | } 411 | }) 412 | 413 | it('/yesterday/states', async function () { 414 | const data = await api.yesterday.states() 415 | data.should.be.a('array') 416 | for(let row of data) { 417 | row.should.have.property('state') 418 | row.should.have.property('cases') 419 | row.should.have.property('todayCases') 420 | row.should.have.property('deaths') 421 | row.should.have.property('todayDeaths') 422 | row.should.have.property('active') 423 | } 424 | }) 425 | 426 | it('/yesterday/states?sort=cases', async function () { 427 | const data = await api.yesterday.states({sort:'cases'}) 428 | data.should.be.a('array') 429 | let maxCases = 999999999; 430 | for(let row of data) { 431 | row.should.have.property('state') 432 | row.should.have.property('cases') 433 | row.cases.should.be.at.most(maxCases); 434 | maxCases = row.cases; 435 | row.should.have.property('todayCases') 436 | row.should.have.property('deaths') 437 | row.should.have.property('todayDeaths') 438 | row.should.have.property('active') 439 | } 440 | }) 441 | 442 | it('/yesterday/states/michigan', async function () { 443 | const data = await api.yesterday.states({state:'michigan'}) 444 | data.should.be.a('object') 445 | data.should.have.property('state', 'Michigan') 446 | data.should.have.property('cases') 447 | data.should.have.property('todayCases') 448 | data.should.have.property('deaths') 449 | data.should.have.property('todayDeaths') 450 | data.should.have.property('active') 451 | }) 452 | 453 | it('/yesterday/states/michigan|new%20york', async function () { 454 | const data = await api.yesterday.states({state:['michigan', 'new york']}) 455 | data.should.be.a('array').of.length(2) 456 | data[0].should.have.property('state', 'Michigan') 457 | data[1].should.have.property('state', 'New York') 458 | for(let row of data){ 459 | row.should.have.property('cases') 460 | row.should.have.property('todayCases') 461 | row.should.have.property('deaths') 462 | row.should.have.property('todayDeaths') 463 | row.should.have.property('active') 464 | } 465 | }) 466 | 467 | it('/yesterday/continents', async function() { 468 | const data = await api.yesterday.continents() 469 | data.should.be.a('array') 470 | for(let row of data) { 471 | row.should.have.property('continent') 472 | row.should.have.property('cases') 473 | row.should.have.property('todayCases') 474 | row.should.have.property('deaths') 475 | row.should.have.property('todayDeaths') 476 | row.should.have.property('recovered') 477 | row.should.have.property('active') 478 | row.should.have.property('critical') 479 | row.should.have.property('updated') 480 | } 481 | }) 482 | 483 | it('/yesterday/continents/europe', async function() { 484 | const data = await api.yesterday.continents({continent:'europe'}) 485 | data.should.be.a('object') 486 | data.should.have.property('continent', 'Europe') 487 | data.should.have.property('cases') 488 | data.should.have.property('todayCases') 489 | data.should.have.property('deaths') 490 | data.should.have.property('todayDeaths') 491 | data.should.have.property('recovered') 492 | data.should.have.property('active') 493 | data.should.have.property('critical') 494 | data.should.have.property('updated') 495 | }) 496 | 497 | it('/yesterday/continents/euro?strict=false', async function() { 498 | const data = await api.yesterday.continents({continent:'europe', strict:false}) 499 | data.should.be.a('object') 500 | data.should.have.property('continent', 'Europe') 501 | data.should.have.property('cases') 502 | data.should.have.property('todayCases') 503 | data.should.have.property('deaths') 504 | data.should.have.property('todayDeaths') 505 | data.should.have.property('recovered') 506 | data.should.have.property('active') 507 | data.should.have.property('critical') 508 | data.should.have.property('updated') 509 | }) 510 | 511 | it('/twoDaysAgo',async function () { 512 | const data = await api.twoDaysAgo.countries() 513 | data.should.be.a('array') 514 | for(let row of data) { 515 | row.should.have.property('country') 516 | row.should.have.property('countryInfo') 517 | row.countryInfo.should.have.property('_id') 518 | row.countryInfo.should.have.property('iso2') 519 | row.countryInfo.should.have.property('iso3') 520 | row.countryInfo.should.have.property('lat') 521 | row.countryInfo.should.have.property('long') 522 | row.countryInfo.should.have.property('flag') 523 | row.should.have.property('cases') 524 | row.should.have.property('todayCases') 525 | row.should.have.property('deaths') 526 | row.should.have.property('todayDeaths') 527 | row.should.have.property('recovered') 528 | row.should.have.property('active') 529 | row.should.have.property('critical') 530 | row.should.have.property('casesPerOneMillion') 531 | row.should.have.property('deathsPerOneMillion') 532 | row.should.have.property('updated') 533 | } 534 | }) 535 | 536 | it('/twoDaysAgo?sort=cases', async function() { 537 | const data = await api.twoDaysAgo.countries({sort:'cases'}) 538 | data.should.be.a('array') 539 | let maxCases = 999999999; 540 | for(let row of data) { 541 | row.should.have.property('country') 542 | row.should.have.property('countryInfo') 543 | row.countryInfo.should.have.property('_id') 544 | row.countryInfo.should.have.property('iso2') 545 | row.countryInfo.should.have.property('iso3') 546 | row.countryInfo.should.have.property('lat') 547 | row.countryInfo.should.have.property('long') 548 | row.countryInfo.should.have.property('flag') 549 | row.should.have.property('cases') 550 | row.cases.should.be.at.most(maxCases); 551 | maxCases = row.cases; 552 | row.should.have.property('todayCases') 553 | row.should.have.property('deaths') 554 | row.should.have.property('todayDeaths') 555 | row.should.have.property('recovered') 556 | row.should.have.property('active') 557 | row.should.have.property('critical') 558 | row.should.have.property('casesPerOneMillion') 559 | row.should.have.property('deathsPerOneMillion') 560 | row.should.have.property('updated') 561 | } 562 | }) 563 | 564 | it('/twoDaysAgo/all', async function () { 565 | const data = await api.twoDaysAgo.all() 566 | data.should.be.a('object') 567 | data.should.have.property('cases') 568 | data.should.have.property('todayCases') 569 | data.should.have.property('deaths') 570 | data.should.have.property('todayDeaths') 571 | data.should.have.property('recovered') 572 | data.should.have.property('critical') 573 | data.should.have.property('casesPerOneMillion') 574 | data.should.have.property('deathsPerOneMillion') 575 | data.should.have.property('updated') 576 | data.should.have.property('affectedCountries') 577 | }) 578 | 579 | it('/twoDaysAgo/austria',async function () { 580 | const data = await api.twoDaysAgo.countries({country:'austria'}) 581 | data.should.be.a('object') 582 | data.should.have.property('country', 'Austria') 583 | data.should.have.property('countryInfo') 584 | data.countryInfo.should.have.property('_id', 40) 585 | data.countryInfo.should.have.property('iso2') 586 | data.countryInfo.should.have.property('iso3') 587 | data.countryInfo.should.have.property('lat') 588 | data.countryInfo.should.have.property('long') 589 | data.countryInfo.should.have.property('flag') 590 | data.should.have.property('cases') 591 | data.should.have.property('todayCases') 592 | data.should.have.property('deaths') 593 | data.should.have.property('todayDeaths') 594 | data.should.have.property('recovered') 595 | data.should.have.property('active') 596 | data.should.have.property('critical') 597 | data.should.have.property('casesPerOneMillion') 598 | data.should.have.property('deathsPerOneMillion') 599 | data.should.have.property('updated') 600 | }) 601 | 602 | it('/twoDaysAgo/netherlands?strict=true',async function () { 603 | const data = await api.twoDaysAgo.countries({country:'netherlands', strict:true}) 604 | data.should.be.a('object') 605 | data.should.have.property('country', 'Netherlands') 606 | data.should.have.property('countryInfo') 607 | data.countryInfo.should.have.property('_id') 608 | data.countryInfo.should.have.property('iso2') 609 | data.countryInfo.should.have.property('iso3') 610 | data.countryInfo.should.have.property('lat') 611 | data.countryInfo.should.have.property('long') 612 | data.countryInfo.should.have.property('flag') 613 | data.should.have.property('cases') 614 | data.should.have.property('todayCases') 615 | data.should.have.property('deaths') 616 | data.should.have.property('todayDeaths') 617 | data.should.have.property('recovered') 618 | data.should.have.property('active') 619 | data.should.have.property('critical') 620 | data.should.have.property('casesPerOneMillion') 621 | data.should.have.property('deathsPerOneMillion') 622 | data.should.have.property('updated') 623 | }) 624 | 625 | it('/twoDaysAgo/austria|usa',async function () { 626 | const data = await api.twoDaysAgo.countries({country:['austria', 'usa']}) 627 | data.should.be.a('array').of.length(2) 628 | data[0].should.have.property('country', 'Austria') 629 | data[1].should.have.property('country', 'USA') 630 | for(let row of data){ 631 | row.should.have.property('countryInfo') 632 | row.countryInfo.should.have.property('_id') 633 | row.countryInfo.should.have.property('iso2') 634 | row.countryInfo.should.have.property('iso3') 635 | row.countryInfo.should.have.property('lat') 636 | row.countryInfo.should.have.property('long') 637 | row.countryInfo.should.have.property('flag') 638 | row.should.have.property('cases') 639 | row.should.have.property('todayCases') 640 | row.should.have.property('deaths') 641 | row.should.have.property('todayDeaths') 642 | row.should.have.property('recovered') 643 | row.should.have.property('active') 644 | row.should.have.property('critical') 645 | row.should.have.property('casesPerOneMillion') 646 | row.should.have.property('deathsPerOneMillion') 647 | row.should.have.property('updated') 648 | } 649 | }) 650 | 651 | it('/twoDaysAgo/continents', async function() { 652 | const data = await api.twoDaysAgo.continents() 653 | data.should.be.a('array') 654 | for(let row of data) { 655 | row.should.have.property('continent') 656 | row.should.have.property('cases') 657 | row.should.have.property('todayCases') 658 | row.should.have.property('deaths') 659 | row.should.have.property('todayDeaths') 660 | row.should.have.property('recovered') 661 | row.should.have.property('active') 662 | row.should.have.property('critical') 663 | row.should.have.property('updated') 664 | } 665 | }) 666 | 667 | it('/twoDaysAgo/continents/europe', async function() { 668 | const data = await api.twoDaysAgo.continents({continent:'europe'}) 669 | data.should.be.a('object') 670 | data.should.have.property('continent', 'Europe') 671 | data.should.have.property('cases') 672 | data.should.have.property('todayCases') 673 | data.should.have.property('deaths') 674 | data.should.have.property('todayDeaths') 675 | data.should.have.property('recovered') 676 | data.should.have.property('active') 677 | data.should.have.property('critical') 678 | data.should.have.property('updated') 679 | }) 680 | 681 | it('/twoDaysAgo/continents/euro?strict=false', async function() { 682 | const data = await api.twoDaysAgo.continents({continent:'europe', strict:false}) 683 | data.should.be.a('object') 684 | data.should.have.property('continent', 'Europe') 685 | data.should.have.property('cases') 686 | data.should.have.property('todayCases') 687 | data.should.have.property('deaths') 688 | data.should.have.property('todayDeaths') 689 | data.should.have.property('recovered') 690 | data.should.have.property('active') 691 | data.should.have.property('critical') 692 | data.should.have.property('updated') 693 | }) 694 | }) 695 | 696 | describe('JHUCSSE', function() { 697 | it('/v2/jhucsse', async function () { 698 | const data = await api.jhucsse.all() 699 | data.should.be.a('array') 700 | for(let row of data) { 701 | row.should.have.property('country') 702 | row.should.have.property('province') 703 | row.should.have.property('updatedAt') 704 | row.should.have.property('stats') 705 | row.stats.should.have.property('confirmed') 706 | row.stats.should.have.property('deaths') 707 | row.stats.should.have.property('recovered') 708 | row.should.have.property('coordinates') 709 | row.coordinates.should.have.property('longitude') 710 | row.coordinates.should.have.property('latitude') 711 | } 712 | }) 713 | 714 | it('/v2/jhucsse/counties', async function () { 715 | const data = await api.jhucsse.counties() 716 | data.should.be.a('array') 717 | for(let row of data){ 718 | row.should.have.property('country') 719 | row.should.have.property('province') 720 | row.should.have.property('county') 721 | row.should.have.property('updatedAt') 722 | row.should.have.property('stats') 723 | row.stats.should.have.property('confirmed') 724 | row.stats.should.have.property('deaths') 725 | row.stats.should.have.property('recovered') 726 | row.should.have.property('coordinates') 727 | row.coordinates.should.have.property('longitude') 728 | row.coordinates.should.have.property('latitude') 729 | } 730 | }) 731 | 732 | it('/v2/jhucsse/counties/abbeville', async function () { 733 | let data = await api.jhucsse.counties({county:'abbeville'}) 734 | data.should.be.a('array') 735 | for(let row of data){ 736 | row.should.have.property('country', 'US') 737 | row.should.have.property('province', 'South Carolina') 738 | row.should.have.property('county', 'Abbeville') 739 | row.should.have.property('updatedAt') 740 | row.should.have.property('stats') 741 | row.stats.should.have.property('confirmed') 742 | row.stats.should.have.property('deaths') 743 | row.stats.should.have.property('recovered') 744 | row.should.have.property('coordinates') 745 | row.coordinates.should.have.property('longitude') 746 | row.coordinates.should.have.property('latitude') 747 | } 748 | }) 749 | 750 | it('/v2/jhucsse/counties/abbeville|acadia', async function () { 751 | let data = await api.jhucsse.counties({county:['abbeville','acadia']}) 752 | data.should.be.a('object') 753 | data.should.have.property('abbeville') 754 | data.should.have.property('acadia') 755 | data.abbeville[0].should.have.property('country', 'US') 756 | data.abbeville[0].should.have.property('province', 'South Carolina') 757 | data.abbeville[0].should.have.property('county', 'Abbeville') 758 | data.abbeville[0].should.have.property('updatedAt') 759 | data.abbeville[0].should.have.property('stats') 760 | data.abbeville[0].stats.should.have.property('confirmed') 761 | data.abbeville[0].stats.should.have.property('deaths') 762 | data.abbeville[0].stats.should.have.property('recovered') 763 | data.abbeville[0].should.have.property('coordinates') 764 | data.abbeville[0].coordinates.should.have.property('longitude') 765 | data.abbeville[0].coordinates.should.have.property('latitude') 766 | data.acadia[0].should.have.property('country', 'US') 767 | data.acadia[0].should.have.property('province', 'Louisiana') 768 | data.acadia[0].should.have.property('county', 'Acadia') 769 | data.acadia[0].should.have.property('updatedAt') 770 | data.acadia[0].should.have.property('stats') 771 | data.acadia[0].stats.should.have.property('confirmed') 772 | data.acadia[0].stats.should.have.property('deaths') 773 | data.acadia[0].stats.should.have.property('recovered') 774 | data.acadia[0].should.have.property('coordinates') 775 | data.acadia[0].coordinates.should.have.property('longitude') 776 | data.acadia[0].coordinates.should.have.property('latitude') 777 | }) 778 | }) 779 | 780 | describe('HISTORICAL', function () { 781 | it('/v2/historical', async function () { 782 | const data = await api.historical.countries() 783 | data.should.be.a('array') 784 | for(let row of data) { 785 | row.should.have.property('country') 786 | row.should.have.property('province') 787 | row.should.have.property('timeline') 788 | row.timeline.should.be.a('object') 789 | row.timeline.should.have.property('cases') 790 | row.timeline.cases.should.be.a('object') 791 | row.timeline.should.have.property('deaths') 792 | row.timeline.deaths.should.be.a('object') 793 | row.timeline.should.have.property('recovered') 794 | row.timeline.recovered.should.be.a('object') 795 | } 796 | }) 797 | 798 | it('/v2/historical/all', async function () { 799 | const data = await api.historical.all() 800 | data.should.be.a('object') 801 | data.should.have.property('cases') 802 | data.cases.should.be.a('object') 803 | data.should.have.property('deaths') 804 | data.deaths.should.be.a('object') 805 | data.should.have.property('recovered') 806 | data.recovered.should.be.a('object') 807 | }) 808 | 809 | it('/v2/historical/all?lastdays=10', async function () { 810 | const data = await api.historical.all({days:10}) 811 | data.should.be.a('object') 812 | data.should.have.property('cases') 813 | data.cases.should.be.a('object') 814 | Object.keys(data.cases).length.should.be.equal(10); 815 | data.should.have.property('deaths') 816 | data.deaths.should.be.a('object') 817 | Object.keys(data.deaths).length.should.be.equal(10); 818 | data.should.have.property('recovered') 819 | data.recovered.should.be.a('object') 820 | Object.keys(data.recovered).length.should.be.equal(10); 821 | }) 822 | 823 | it('/v2/historical/china', async function () { 824 | const data = await api.historical.countries({country:'china'}) 825 | data.should.be.a('object') 826 | data.should.have.property('country', 'China') 827 | data.should.have.property('province') 828 | data.province.should.be.a('array') 829 | data.should.have.property('timeline') 830 | data.timeline.should.be.a('object') 831 | data.timeline.should.have.property('cases') 832 | data.timeline.cases.should.be.a('object') 833 | data.timeline.should.have.property('deaths') 834 | data.timeline.deaths.should.be.a('object') 835 | data.timeline.should.have.property('recovered') 836 | data.timeline.recovered.should.be.a('object') 837 | }) 838 | 839 | it('/v2/historical/china?lastdays=10', async function () { 840 | const data = await api.historical.countries({country:'china', days:10}) 841 | data.should.be.a('object') 842 | data.should.have.property('country', 'China') 843 | data.should.have.property('province') 844 | data.province.should.be.a('array') 845 | data.should.have.property('timeline') 846 | data.timeline.should.be.a('object') 847 | data.timeline.should.have.property('cases') 848 | data.timeline.cases.should.be.a('object') 849 | Object.keys(data.timeline.cases).length.should.be.equal(10); 850 | data.timeline.should.have.property('deaths') 851 | data.timeline.deaths.should.be.a('object') 852 | Object.keys(data.timeline.deaths).length.should.be.equal(10); 853 | data.timeline.should.have.property('recovered') 854 | data.timeline.recovered.should.be.a('object') 855 | Object.keys(data.timeline.recovered).length.should.be.equal(10); 856 | }) 857 | 858 | it('/v2/historical/china/hubei', async function () { 859 | const data = await api.historical.countries({country:'china', province:'hubei'}) 860 | data.should.be.a('object') 861 | data.should.have.property('country') 862 | data.should.have.property('province') 863 | data.should.have.property('timeline') 864 | data.timeline.should.be.a('object') 865 | data.timeline.should.have.property('cases') 866 | data.timeline.cases.should.be.a('object') 867 | data.timeline.should.have.property('deaths') 868 | data.timeline.deaths.should.be.a('object') 869 | data.timeline.should.have.property('recovered') 870 | data.timeline.recovered.should.be.a('object') 871 | }) 872 | 873 | it('/v2/historical/china/hubei|anhui', async function () { 874 | const data = await api.historical.countries({country:'china', province:['hubei', 'anhui']}) 875 | data.should.be.a('array') 876 | data[0].should.have.property('province', 'hubei') 877 | data[1].should.have.property('province', 'anhui') 878 | for(let row of data){ 879 | row.should.have.property('country', 'China') 880 | row.should.have.property('timeline') 881 | row.timeline.should.be.a('object') 882 | row.timeline.should.have.property('cases') 883 | row.timeline.cases.should.be.a('object') 884 | row.timeline.should.have.property('deaths') 885 | row.timeline.deaths.should.be.a('object') 886 | row.timeline.should.have.property('recovered') 887 | row.timeline.recovered.should.be.a('object') 888 | } 889 | }) 890 | }) 891 | 892 | describe('NY TIMES', function() { 893 | it('/v2/nyt/states', async function () { 894 | const data = await api.nyt.states() 895 | data.should.be.a('array') 896 | for(let row of data){ 897 | row.should.have.property('date') 898 | row.should.have.property('state') 899 | row.should.have.property('fips') 900 | row.should.have.property('cases') 901 | row.should.have.property('deaths') 902 | } 903 | }) 904 | 905 | it('/v2/nyt/states/illinois', async function () { 906 | const data = await api.nyt.states({state:'illinois'}) 907 | data.should.be.a('array') 908 | for(let row of data){ 909 | row.should.have.property('date') 910 | row.should.have.property('state', 'Illinois') 911 | row.should.have.property('fips', '17') 912 | row.should.have.property('cases') 913 | row.should.have.property('deaths') 914 | } 915 | }) 916 | 917 | it('/v2/nyt/counties/cook', async function () { 918 | const data = await api.nyt.counties({county:'cook'}) 919 | data.should.be.a('array') 920 | for(let row of data){ 921 | row.should.have.property('date') 922 | row.should.have.property('county', 'Cook') 923 | row.should.have.property('state') 924 | row.should.have.property('fips') 925 | row.should.have.property('cases') 926 | row.should.have.property('deaths') 927 | } 928 | }) 929 | 930 | it('/v2/nyt/usa', async function () { 931 | const data = await api.nyt.usa() 932 | data.should.be.a('array') 933 | for(let row of data){ 934 | row.should.have.property('date') 935 | row.should.have.property('cases') 936 | row.should.have.property('deaths') 937 | } 938 | }) 939 | }) 940 | 941 | describe('APPLE MOBILITY', function() { 942 | it('/v2/apple/countries', async function () { 943 | const data = await api.apple.countries() 944 | data.should.be.a('array').of.length(63) 945 | for(let row of data) row.should.be.a('string') 946 | }) 947 | 948 | it('/v2/apple/countries/austria', async function () { 949 | const data = await api.apple.subregions('austria') 950 | data.should.be.a('object') 951 | data.should.have.property('country', 'Austria') 952 | data.should.have.property('subregions') 953 | data.subregions.should.be.a('array').of.length(11) 954 | for(let row of data.subregions) row.should.be.a('string') 955 | }) 956 | 957 | it('/v2/apple/countries/austria/vienna', async function () { 958 | const data = await api.apple.mobilityData({country:'austria', subregion: 'vienna'}) 959 | data.should.be.a('object') 960 | data.should.have.property('country', 'Austria') 961 | data.should.have.property('subregion', 'Vienna') 962 | data.should.have.property('data') 963 | data.data.should.be.a('array') 964 | for(let row of data.data){ 965 | row.should.have.property('subregion_and_city') 966 | row.should.have.property('geo_type') 967 | row.should.have.property('date') 968 | row.should.have.property('driving') 969 | row.should.have.property('transit') 970 | row.should.have.property('walking') 971 | } 972 | }) 973 | 974 | it('/v2/apple/countries/austria/vienna|salzburg', async function () { 975 | const data = await api.apple.mobilityData({country:'austria', subregion: ['vienna', 'salzburg']}) 976 | data.should.be.a('array') 977 | for(let entry of data) { 978 | //data.should.have.property('country') 979 | entry.should.have.property('subregion') 980 | entry.should.have.property('data') 981 | entry.data.should.be.a('array') 982 | for(let row of entry.data){ 983 | row.should.have.property('subregion_and_city') 984 | row.should.have.property('geo_type') 985 | row.should.have.property('date') 986 | row.should.have.property('driving') 987 | row.should.have.property('transit') 988 | row.should.have.property('walking') 989 | } 990 | } 991 | }) 992 | }) 993 | 994 | describe('GOVERNMENT DATA', function() { 995 | it('/v2/gov', async function (){ 996 | const data = await api.gov() 997 | data.should.be.a('array') 998 | }) 999 | 1000 | it('/v2/gov/*', async function (){ 1001 | const data = await api.gov() 1002 | for(const country of data) { 1003 | const govData = await api.gov(country) 1004 | should.exist(govData) 1005 | } 1006 | }) 1007 | }) 1008 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "novelcovid", 3 | "version": "3.0.2", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@aero/centra": { 8 | "version": "1.0.3", 9 | "resolved": "https://registry.npmjs.org/@aero/centra/-/centra-1.0.3.tgz", 10 | "integrity": "sha512-Ljd3utKoMcXiMSLr4uxMD9EAFeqw2nOEGfvMXVRKX4sT1OlYuUVQEz1Xrfi5z0RNrGXjm50lJq1jLlRW4FYcEA==" 11 | }, 12 | "ansi-colors": { 13 | "version": "3.2.3", 14 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", 15 | "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", 16 | "dev": true 17 | }, 18 | "ansi-regex": { 19 | "version": "3.0.0", 20 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", 21 | "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", 22 | "dev": true 23 | }, 24 | "ansi-styles": { 25 | "version": "3.2.1", 26 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 27 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 28 | "dev": true, 29 | "requires": { 30 | "color-convert": "^1.9.0" 31 | } 32 | }, 33 | "anymatch": { 34 | "version": "3.1.1", 35 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", 36 | "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", 37 | "dev": true, 38 | "requires": { 39 | "normalize-path": "^3.0.0", 40 | "picomatch": "^2.0.4" 41 | } 42 | }, 43 | "argparse": { 44 | "version": "1.0.10", 45 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 46 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 47 | "dev": true, 48 | "requires": { 49 | "sprintf-js": "~1.0.2" 50 | } 51 | }, 52 | "assertion-error": { 53 | "version": "1.1.0", 54 | "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", 55 | "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", 56 | "dev": true 57 | }, 58 | "balanced-match": { 59 | "version": "1.0.0", 60 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 61 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 62 | "dev": true 63 | }, 64 | "binary-extensions": { 65 | "version": "2.1.0", 66 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", 67 | "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", 68 | "dev": true 69 | }, 70 | "brace-expansion": { 71 | "version": "1.1.11", 72 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 73 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 74 | "dev": true, 75 | "requires": { 76 | "balanced-match": "^1.0.0", 77 | "concat-map": "0.0.1" 78 | } 79 | }, 80 | "braces": { 81 | "version": "3.0.2", 82 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 83 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 84 | "dev": true, 85 | "requires": { 86 | "fill-range": "^7.0.1" 87 | } 88 | }, 89 | "browser-stdout": { 90 | "version": "1.3.1", 91 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 92 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 93 | "dev": true 94 | }, 95 | "camelcase": { 96 | "version": "5.3.1", 97 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", 98 | "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", 99 | "dev": true 100 | }, 101 | "chai": { 102 | "version": "4.2.0", 103 | "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", 104 | "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", 105 | "dev": true, 106 | "requires": { 107 | "assertion-error": "^1.1.0", 108 | "check-error": "^1.0.2", 109 | "deep-eql": "^3.0.1", 110 | "get-func-name": "^2.0.0", 111 | "pathval": "^1.1.0", 112 | "type-detect": "^4.0.5" 113 | } 114 | }, 115 | "chalk": { 116 | "version": "2.4.2", 117 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 118 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 119 | "dev": true, 120 | "requires": { 121 | "ansi-styles": "^3.2.1", 122 | "escape-string-regexp": "^1.0.5", 123 | "supports-color": "^5.3.0" 124 | }, 125 | "dependencies": { 126 | "supports-color": { 127 | "version": "5.5.0", 128 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 129 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 130 | "dev": true, 131 | "requires": { 132 | "has-flag": "^3.0.0" 133 | } 134 | } 135 | } 136 | }, 137 | "check-error": { 138 | "version": "1.0.2", 139 | "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", 140 | "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", 141 | "dev": true 142 | }, 143 | "chokidar": { 144 | "version": "3.3.0", 145 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", 146 | "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", 147 | "dev": true, 148 | "requires": { 149 | "anymatch": "~3.1.1", 150 | "braces": "~3.0.2", 151 | "fsevents": "~2.1.1", 152 | "glob-parent": "~5.1.0", 153 | "is-binary-path": "~2.1.0", 154 | "is-glob": "~4.0.1", 155 | "normalize-path": "~3.0.0", 156 | "readdirp": "~3.2.0" 157 | } 158 | }, 159 | "cliui": { 160 | "version": "5.0.0", 161 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", 162 | "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", 163 | "dev": true, 164 | "requires": { 165 | "string-width": "^3.1.0", 166 | "strip-ansi": "^5.2.0", 167 | "wrap-ansi": "^5.1.0" 168 | }, 169 | "dependencies": { 170 | "ansi-regex": { 171 | "version": "4.1.0", 172 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", 173 | "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", 174 | "dev": true 175 | }, 176 | "string-width": { 177 | "version": "3.1.0", 178 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", 179 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", 180 | "dev": true, 181 | "requires": { 182 | "emoji-regex": "^7.0.1", 183 | "is-fullwidth-code-point": "^2.0.0", 184 | "strip-ansi": "^5.1.0" 185 | } 186 | }, 187 | "strip-ansi": { 188 | "version": "5.2.0", 189 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", 190 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", 191 | "dev": true, 192 | "requires": { 193 | "ansi-regex": "^4.1.0" 194 | } 195 | } 196 | } 197 | }, 198 | "color-convert": { 199 | "version": "1.9.3", 200 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 201 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 202 | "dev": true, 203 | "requires": { 204 | "color-name": "1.1.3" 205 | } 206 | }, 207 | "color-name": { 208 | "version": "1.1.3", 209 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 210 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", 211 | "dev": true 212 | }, 213 | "concat-map": { 214 | "version": "0.0.1", 215 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 216 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 217 | "dev": true 218 | }, 219 | "debug": { 220 | "version": "3.2.6", 221 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", 222 | "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", 223 | "dev": true, 224 | "requires": { 225 | "ms": "^2.1.1" 226 | } 227 | }, 228 | "decamelize": { 229 | "version": "1.2.0", 230 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", 231 | "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", 232 | "dev": true 233 | }, 234 | "deep-eql": { 235 | "version": "3.0.1", 236 | "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", 237 | "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", 238 | "dev": true, 239 | "requires": { 240 | "type-detect": "^4.0.0" 241 | } 242 | }, 243 | "define-properties": { 244 | "version": "1.1.3", 245 | "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", 246 | "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", 247 | "dev": true, 248 | "requires": { 249 | "object-keys": "^1.0.12" 250 | } 251 | }, 252 | "diff": { 253 | "version": "3.5.0", 254 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", 255 | "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", 256 | "dev": true 257 | }, 258 | "emoji-regex": { 259 | "version": "7.0.3", 260 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", 261 | "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", 262 | "dev": true 263 | }, 264 | "es-abstract": { 265 | "version": "1.17.6", 266 | "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", 267 | "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", 268 | "dev": true, 269 | "requires": { 270 | "es-to-primitive": "^1.2.1", 271 | "function-bind": "^1.1.1", 272 | "has": "^1.0.3", 273 | "has-symbols": "^1.0.1", 274 | "is-callable": "^1.2.0", 275 | "is-regex": "^1.1.0", 276 | "object-inspect": "^1.7.0", 277 | "object-keys": "^1.1.1", 278 | "object.assign": "^4.1.0", 279 | "string.prototype.trimend": "^1.0.1", 280 | "string.prototype.trimstart": "^1.0.1" 281 | } 282 | }, 283 | "es-to-primitive": { 284 | "version": "1.2.1", 285 | "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", 286 | "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", 287 | "dev": true, 288 | "requires": { 289 | "is-callable": "^1.1.4", 290 | "is-date-object": "^1.0.1", 291 | "is-symbol": "^1.0.2" 292 | } 293 | }, 294 | "escape-string-regexp": { 295 | "version": "1.0.5", 296 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 297 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 298 | "dev": true 299 | }, 300 | "esprima": { 301 | "version": "4.0.1", 302 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 303 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 304 | "dev": true 305 | }, 306 | "fill-range": { 307 | "version": "7.0.1", 308 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 309 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 310 | "dev": true, 311 | "requires": { 312 | "to-regex-range": "^5.0.1" 313 | } 314 | }, 315 | "find-up": { 316 | "version": "3.0.0", 317 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", 318 | "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", 319 | "dev": true, 320 | "requires": { 321 | "locate-path": "^3.0.0" 322 | } 323 | }, 324 | "flat": { 325 | "version": "4.1.0", 326 | "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", 327 | "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", 328 | "dev": true, 329 | "requires": { 330 | "is-buffer": "~2.0.3" 331 | } 332 | }, 333 | "fs.realpath": { 334 | "version": "1.0.0", 335 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 336 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 337 | "dev": true 338 | }, 339 | "fsevents": { 340 | "version": "2.1.3", 341 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", 342 | "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", 343 | "dev": true, 344 | "optional": true 345 | }, 346 | "function-bind": { 347 | "version": "1.1.1", 348 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 349 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 350 | "dev": true 351 | }, 352 | "get-caller-file": { 353 | "version": "2.0.5", 354 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 355 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 356 | "dev": true 357 | }, 358 | "get-func-name": { 359 | "version": "2.0.0", 360 | "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", 361 | "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", 362 | "dev": true 363 | }, 364 | "glob": { 365 | "version": "7.1.3", 366 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", 367 | "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", 368 | "dev": true, 369 | "requires": { 370 | "fs.realpath": "^1.0.0", 371 | "inflight": "^1.0.4", 372 | "inherits": "2", 373 | "minimatch": "^3.0.4", 374 | "once": "^1.3.0", 375 | "path-is-absolute": "^1.0.0" 376 | } 377 | }, 378 | "glob-parent": { 379 | "version": "5.1.2", 380 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 381 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 382 | "dev": true, 383 | "requires": { 384 | "is-glob": "^4.0.1" 385 | } 386 | }, 387 | "growl": { 388 | "version": "1.10.5", 389 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", 390 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", 391 | "dev": true 392 | }, 393 | "has": { 394 | "version": "1.0.3", 395 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 396 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 397 | "dev": true, 398 | "requires": { 399 | "function-bind": "^1.1.1" 400 | } 401 | }, 402 | "has-flag": { 403 | "version": "3.0.0", 404 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 405 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 406 | "dev": true 407 | }, 408 | "has-symbols": { 409 | "version": "1.0.1", 410 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", 411 | "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", 412 | "dev": true 413 | }, 414 | "he": { 415 | "version": "1.2.0", 416 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 417 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 418 | "dev": true 419 | }, 420 | "inflight": { 421 | "version": "1.0.6", 422 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 423 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 424 | "dev": true, 425 | "requires": { 426 | "once": "^1.3.0", 427 | "wrappy": "1" 428 | } 429 | }, 430 | "inherits": { 431 | "version": "2.0.4", 432 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 433 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 434 | "dev": true 435 | }, 436 | "is-binary-path": { 437 | "version": "2.1.0", 438 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 439 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 440 | "dev": true, 441 | "requires": { 442 | "binary-extensions": "^2.0.0" 443 | } 444 | }, 445 | "is-buffer": { 446 | "version": "2.0.4", 447 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", 448 | "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", 449 | "dev": true 450 | }, 451 | "is-callable": { 452 | "version": "1.2.0", 453 | "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", 454 | "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", 455 | "dev": true 456 | }, 457 | "is-date-object": { 458 | "version": "1.0.2", 459 | "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", 460 | "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", 461 | "dev": true 462 | }, 463 | "is-extglob": { 464 | "version": "2.1.1", 465 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 466 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 467 | "dev": true 468 | }, 469 | "is-fullwidth-code-point": { 470 | "version": "2.0.0", 471 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 472 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", 473 | "dev": true 474 | }, 475 | "is-glob": { 476 | "version": "4.0.1", 477 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 478 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 479 | "dev": true, 480 | "requires": { 481 | "is-extglob": "^2.1.1" 482 | } 483 | }, 484 | "is-number": { 485 | "version": "7.0.0", 486 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 487 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 488 | "dev": true 489 | }, 490 | "is-regex": { 491 | "version": "1.1.0", 492 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", 493 | "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", 494 | "dev": true, 495 | "requires": { 496 | "has-symbols": "^1.0.1" 497 | } 498 | }, 499 | "is-symbol": { 500 | "version": "1.0.3", 501 | "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", 502 | "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", 503 | "dev": true, 504 | "requires": { 505 | "has-symbols": "^1.0.1" 506 | } 507 | }, 508 | "isexe": { 509 | "version": "2.0.0", 510 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 511 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 512 | "dev": true 513 | }, 514 | "js-yaml": { 515 | "version": "3.13.1", 516 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", 517 | "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", 518 | "dev": true, 519 | "requires": { 520 | "argparse": "^1.0.7", 521 | "esprima": "^4.0.0" 522 | } 523 | }, 524 | "locate-path": { 525 | "version": "3.0.0", 526 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", 527 | "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", 528 | "dev": true, 529 | "requires": { 530 | "p-locate": "^3.0.0", 531 | "path-exists": "^3.0.0" 532 | } 533 | }, 534 | "lodash": { 535 | "version": "4.17.21", 536 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 537 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", 538 | "dev": true 539 | }, 540 | "log-symbols": { 541 | "version": "3.0.0", 542 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", 543 | "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", 544 | "dev": true, 545 | "requires": { 546 | "chalk": "^2.4.2" 547 | } 548 | }, 549 | "minimatch": { 550 | "version": "3.0.4", 551 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 552 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 553 | "dev": true, 554 | "requires": { 555 | "brace-expansion": "^1.1.7" 556 | } 557 | }, 558 | "minimist": { 559 | "version": "1.2.5", 560 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 561 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", 562 | "dev": true 563 | }, 564 | "mkdirp": { 565 | "version": "0.5.5", 566 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", 567 | "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", 568 | "dev": true, 569 | "requires": { 570 | "minimist": "^1.2.5" 571 | } 572 | }, 573 | "mocha": { 574 | "version": "7.2.0", 575 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", 576 | "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", 577 | "dev": true, 578 | "requires": { 579 | "ansi-colors": "3.2.3", 580 | "browser-stdout": "1.3.1", 581 | "chokidar": "3.3.0", 582 | "debug": "3.2.6", 583 | "diff": "3.5.0", 584 | "escape-string-regexp": "1.0.5", 585 | "find-up": "3.0.0", 586 | "glob": "7.1.3", 587 | "growl": "1.10.5", 588 | "he": "1.2.0", 589 | "js-yaml": "3.13.1", 590 | "log-symbols": "3.0.0", 591 | "minimatch": "3.0.4", 592 | "mkdirp": "0.5.5", 593 | "ms": "2.1.1", 594 | "node-environment-flags": "1.0.6", 595 | "object.assign": "4.1.0", 596 | "strip-json-comments": "2.0.1", 597 | "supports-color": "6.0.0", 598 | "which": "1.3.1", 599 | "wide-align": "1.1.3", 600 | "yargs": "13.3.2", 601 | "yargs-parser": "13.1.2", 602 | "yargs-unparser": "1.6.0" 603 | } 604 | }, 605 | "ms": { 606 | "version": "2.1.1", 607 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 608 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", 609 | "dev": true 610 | }, 611 | "node-environment-flags": { 612 | "version": "1.0.6", 613 | "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", 614 | "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", 615 | "dev": true, 616 | "requires": { 617 | "object.getownpropertydescriptors": "^2.0.3", 618 | "semver": "^5.7.0" 619 | } 620 | }, 621 | "normalize-path": { 622 | "version": "3.0.0", 623 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 624 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 625 | "dev": true 626 | }, 627 | "object-inspect": { 628 | "version": "1.8.0", 629 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", 630 | "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", 631 | "dev": true 632 | }, 633 | "object-keys": { 634 | "version": "1.1.1", 635 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", 636 | "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", 637 | "dev": true 638 | }, 639 | "object.assign": { 640 | "version": "4.1.0", 641 | "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", 642 | "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", 643 | "dev": true, 644 | "requires": { 645 | "define-properties": "^1.1.2", 646 | "function-bind": "^1.1.1", 647 | "has-symbols": "^1.0.0", 648 | "object-keys": "^1.0.11" 649 | } 650 | }, 651 | "object.getownpropertydescriptors": { 652 | "version": "2.1.0", 653 | "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", 654 | "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", 655 | "dev": true, 656 | "requires": { 657 | "define-properties": "^1.1.3", 658 | "es-abstract": "^1.17.0-next.1" 659 | } 660 | }, 661 | "once": { 662 | "version": "1.4.0", 663 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 664 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 665 | "dev": true, 666 | "requires": { 667 | "wrappy": "1" 668 | } 669 | }, 670 | "p-limit": { 671 | "version": "2.3.0", 672 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", 673 | "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", 674 | "dev": true, 675 | "requires": { 676 | "p-try": "^2.0.0" 677 | } 678 | }, 679 | "p-locate": { 680 | "version": "3.0.0", 681 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", 682 | "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", 683 | "dev": true, 684 | "requires": { 685 | "p-limit": "^2.0.0" 686 | } 687 | }, 688 | "p-try": { 689 | "version": "2.2.0", 690 | "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", 691 | "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", 692 | "dev": true 693 | }, 694 | "path-exists": { 695 | "version": "3.0.0", 696 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", 697 | "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", 698 | "dev": true 699 | }, 700 | "path-is-absolute": { 701 | "version": "1.0.1", 702 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 703 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 704 | "dev": true 705 | }, 706 | "pathval": { 707 | "version": "1.1.0", 708 | "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", 709 | "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", 710 | "dev": true 711 | }, 712 | "picomatch": { 713 | "version": "2.2.2", 714 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", 715 | "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", 716 | "dev": true 717 | }, 718 | "readdirp": { 719 | "version": "3.2.0", 720 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", 721 | "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", 722 | "dev": true, 723 | "requires": { 724 | "picomatch": "^2.0.4" 725 | } 726 | }, 727 | "require-directory": { 728 | "version": "2.1.1", 729 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 730 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", 731 | "dev": true 732 | }, 733 | "require-main-filename": { 734 | "version": "2.0.0", 735 | "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", 736 | "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", 737 | "dev": true 738 | }, 739 | "semver": { 740 | "version": "5.7.1", 741 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 742 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 743 | "dev": true 744 | }, 745 | "set-blocking": { 746 | "version": "2.0.0", 747 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", 748 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", 749 | "dev": true 750 | }, 751 | "sprintf-js": { 752 | "version": "1.0.3", 753 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 754 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 755 | "dev": true 756 | }, 757 | "string-width": { 758 | "version": "2.1.1", 759 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", 760 | "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", 761 | "dev": true, 762 | "requires": { 763 | "is-fullwidth-code-point": "^2.0.0", 764 | "strip-ansi": "^4.0.0" 765 | } 766 | }, 767 | "string.prototype.trimend": { 768 | "version": "1.0.1", 769 | "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", 770 | "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", 771 | "dev": true, 772 | "requires": { 773 | "define-properties": "^1.1.3", 774 | "es-abstract": "^1.17.5" 775 | } 776 | }, 777 | "string.prototype.trimstart": { 778 | "version": "1.0.1", 779 | "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", 780 | "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", 781 | "dev": true, 782 | "requires": { 783 | "define-properties": "^1.1.3", 784 | "es-abstract": "^1.17.5" 785 | } 786 | }, 787 | "strip-ansi": { 788 | "version": "4.0.0", 789 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", 790 | "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", 791 | "dev": true, 792 | "requires": { 793 | "ansi-regex": "^3.0.0" 794 | } 795 | }, 796 | "strip-json-comments": { 797 | "version": "2.0.1", 798 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 799 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", 800 | "dev": true 801 | }, 802 | "supports-color": { 803 | "version": "6.0.0", 804 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", 805 | "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", 806 | "dev": true, 807 | "requires": { 808 | "has-flag": "^3.0.0" 809 | } 810 | }, 811 | "to-regex-range": { 812 | "version": "5.0.1", 813 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 814 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 815 | "dev": true, 816 | "requires": { 817 | "is-number": "^7.0.0" 818 | } 819 | }, 820 | "type-detect": { 821 | "version": "4.0.8", 822 | "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", 823 | "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", 824 | "dev": true 825 | }, 826 | "typescript": { 827 | "version": "3.9.5", 828 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.5.tgz", 829 | "integrity": "sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==", 830 | "dev": true 831 | }, 832 | "which": { 833 | "version": "1.3.1", 834 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 835 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", 836 | "dev": true, 837 | "requires": { 838 | "isexe": "^2.0.0" 839 | } 840 | }, 841 | "which-module": { 842 | "version": "2.0.0", 843 | "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", 844 | "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", 845 | "dev": true 846 | }, 847 | "wide-align": { 848 | "version": "1.1.3", 849 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", 850 | "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", 851 | "dev": true, 852 | "requires": { 853 | "string-width": "^1.0.2 || 2" 854 | } 855 | }, 856 | "wrap-ansi": { 857 | "version": "5.1.0", 858 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", 859 | "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", 860 | "dev": true, 861 | "requires": { 862 | "ansi-styles": "^3.2.0", 863 | "string-width": "^3.0.0", 864 | "strip-ansi": "^5.0.0" 865 | }, 866 | "dependencies": { 867 | "ansi-regex": { 868 | "version": "4.1.0", 869 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", 870 | "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", 871 | "dev": true 872 | }, 873 | "string-width": { 874 | "version": "3.1.0", 875 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", 876 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", 877 | "dev": true, 878 | "requires": { 879 | "emoji-regex": "^7.0.1", 880 | "is-fullwidth-code-point": "^2.0.0", 881 | "strip-ansi": "^5.1.0" 882 | } 883 | }, 884 | "strip-ansi": { 885 | "version": "5.2.0", 886 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", 887 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", 888 | "dev": true, 889 | "requires": { 890 | "ansi-regex": "^4.1.0" 891 | } 892 | } 893 | } 894 | }, 895 | "wrappy": { 896 | "version": "1.0.2", 897 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 898 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 899 | "dev": true 900 | }, 901 | "y18n": { 902 | "version": "4.0.1", 903 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", 904 | "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", 905 | "dev": true 906 | }, 907 | "yargs": { 908 | "version": "13.3.2", 909 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", 910 | "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", 911 | "dev": true, 912 | "requires": { 913 | "cliui": "^5.0.0", 914 | "find-up": "^3.0.0", 915 | "get-caller-file": "^2.0.1", 916 | "require-directory": "^2.1.1", 917 | "require-main-filename": "^2.0.0", 918 | "set-blocking": "^2.0.0", 919 | "string-width": "^3.0.0", 920 | "which-module": "^2.0.0", 921 | "y18n": "^4.0.0", 922 | "yargs-parser": "^13.1.2" 923 | }, 924 | "dependencies": { 925 | "ansi-regex": { 926 | "version": "4.1.0", 927 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", 928 | "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", 929 | "dev": true 930 | }, 931 | "string-width": { 932 | "version": "3.1.0", 933 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", 934 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", 935 | "dev": true, 936 | "requires": { 937 | "emoji-regex": "^7.0.1", 938 | "is-fullwidth-code-point": "^2.0.0", 939 | "strip-ansi": "^5.1.0" 940 | } 941 | }, 942 | "strip-ansi": { 943 | "version": "5.2.0", 944 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", 945 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", 946 | "dev": true, 947 | "requires": { 948 | "ansi-regex": "^4.1.0" 949 | } 950 | } 951 | } 952 | }, 953 | "yargs-parser": { 954 | "version": "13.1.2", 955 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", 956 | "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", 957 | "dev": true, 958 | "requires": { 959 | "camelcase": "^5.0.0", 960 | "decamelize": "^1.2.0" 961 | } 962 | }, 963 | "yargs-unparser": { 964 | "version": "1.6.0", 965 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", 966 | "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", 967 | "dev": true, 968 | "requires": { 969 | "flat": "^4.1.0", 970 | "lodash": "^4.17.15", 971 | "yargs": "^13.3.0" 972 | } 973 | } 974 | } 975 | } 976 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "novelcovid", 3 | "version": "3.0.2", 4 | "description": "An API wrapper to get information about COVID-19.", 5 | "keywords": [ 6 | "coronavirus", 7 | "wrapper", 8 | "api" 9 | ], 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/NovelCOVID/node-api.git" 13 | }, 14 | "bugs": { 15 | "url": "https://github.com/NovelCOVID/node-api/issues" 16 | }, 17 | "homepage": "https://github.com/NovelCOVID/node-api#readme", 18 | "main": "index.js", 19 | "dependencies": { 20 | "@aero/centra": "^1.0.3" 21 | }, 22 | "devDependencies": { 23 | "chai": "^4.2.0", 24 | "mocha": "7.2.0", 25 | "typescript": "3.9.5" 26 | }, 27 | "scripts": { 28 | "declaration": "rm -f index.d.ts && tsc", 29 | "test": "mocha ./index.spec.js --exit --t 90000" 30 | }, 31 | "author": "puf17640", 32 | "license": "WTFPL" 33 | } 34 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "index.js" 4 | ], 5 | "compilerOptions": { 6 | "target": "ESNext", 7 | "module": "commonjs", 8 | "allowJs": true, 9 | "resolveJsonModule": true, 10 | "declaration": true, 11 | "noEmit": false, 12 | "emitDeclarationOnly": true, 13 | "strict": true, 14 | "noImplicitAny": true, 15 | "strictNullChecks": true, 16 | "noUnusedLocals": true 17 | } 18 | } --------------------------------------------------------------------------------