2.0.0 • Published 5 years ago
dl-data v2.0.0
dl-data
Download files in a structured way
Installation
npm install dl-data
Usage
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 alex7kom@gmail.com