@mborne/dl
v0.4.0
Published
Helper based on wget to download files
Readme
node-dl
Download file from a given sourceUrl to a targetPath with wget.
Usage
const download = require('@mborne/dl');
/*
* Note that a temp file `{targetPath}.part` is created while downloading to handle download interuptions
*/
const targetPath = await download({
sourceUrl: 'https://github.com/mborne.keys',
targetPath: '/tmp/mborne.keys'
});Options
| Name | Required? | Description | Default |
| ------------------ | :-------: | ----------------------------------- | :-----: |
| sourceUrl | YES | Source URL (http, https, ftp) | NA |
| targetPath | YES | Input encoding (UTF-8, LATIN1,...) | NA |
| downloadIfExists | NO | Download file if targetPath exists? | true |
| unsafeSsl | NO | Disable certificate checking | false |
