UNPKG
@justalk/covid19ph-api
Version:
latest (3.1.0)
3.1.0
3.0.0
2.0.0
1.0.0
API for COVID 19 Cases in the Philippines
github.com/JustalK/COVID19PH-API
JustalK/COVID19PH-API
@justalk/covid19ph-api
/
src
/
server
/
libs
/
utils.js
12 lines
(10 loc)
•
294 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
const
got =
require
(
'got'
);
module
.
exports
= {
get_the_follow_link
:
async
doh_source => {
const
response =
await
got
(doh_source);
return
response.
redirectUrls
[
0
]; },
get_covid_case_file
:
files
=>
{
return
files.
find
(
file
=>
file.
name
&& file.
name
.
includes
(
'Case Information'
)); } };