dl-data
v2.0.0
Published
Download files in a structured way
Readme
dl-data
Download files in a structured way
Installation
npm install dl-dataUsage
Require the module:
const downloadData = require('dl-data');API
downloadData(baseDir, filesObject, [options])
Returns a Promise.
baseDir- an absolute path which will be used as a base directory for placing filesfilesObject- an object with a structure mirroring a directory structure:
{
"sample.json": "https://example.com/sample.json",
"data": {
"example.json": "https://example.com/example.json"
}
}options- (optional) Got options which will be used for each request.
License
MIT © Alexey Komarov [email protected]
