2.0.0 • Published 5 years ago

dl-data v2.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

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 files

  • filesObject - 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

2.0.0

5 years ago

1.0.0

6 years ago