0.4.0 • Published 1 year ago

@mborne/dl v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

node-dl

Node.js CI Coverage Status

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

NameRequired?DescriptionDefault
sourceUrlYESSource URL (http, https, ftp)NA
targetPathYESInput encoding (UTF-8, LATIN1,...)NA
downloadIfExistsNODownload file if targetPath exists?true
unsafeSslNODisable certificate checkingfalse

License

MIT

0.4.0

1 year ago

0.3.0

3 years ago

0.3.1

3 years ago

0.2.1

4 years ago

0.2.0

6 years ago

0.1.0

6 years ago