Class

Fetcher

Fetcher()

File fetcher and parser, especially for Pbf custom schema.

Constructor

# new Fetcher()

View Source src/workers/fetcher.js, line 12

Methods

# async fetch(filesToFetch, dateLists)

Fetch a list of files and index available dates to provided dateLists.

Parameters:
Name Type Description
filesToFetch Array

List of files to fetch

dateLists Object

Object with date lists

View Source src/workers/fetcher.js, line 42

# async fetchAndClean(filesToFetch, dateLists)

Fetch a list of files and index available dates to provided dateLists. Cleans output before return

Parameters:
Name Type Description
filesToFetch Array

List of files to fetch

dateLists Object

Object with date lists

View Source src/workers/fetcher.js, line 55

# fetchFile(fileInfo, dateLists) → {Promise}

Main method to fetch a single data file

Parameters:
Name Type Description
fileInfo FileInfo
dateLists Object

List of date values, typically {isoDateList: ['01-01-2021', '01-02-2021', ...]}

View Source src/workers/fetcher.js, line 20

Promise with data

Promise