2.0.0 • Published 5 years ago

queueue-download v2.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

queueue-download

NPM Version NPM Downloads

File download queue with unique file names support

Instalation

npm i queueue-download

Usage

const download = require('queueue-download');

const files = [
  {
    remote: 'url://to/remote/file',
    local: '/localpath/to/file'
  },
  {
    remote: 'url://to/remote/file',
    local: '/localpath/to/file'
  }
];

const res = await download(files);

Options

async download(files, opts);

Returns an array with results. It never throws an error, all errors are in the result array.

  • force — force path creation
  • concurrency — number of simultaneous downloads, 'auto' or undefined are equals to cpus number

Id

Also you can add an id field to the files, and it will be returned in the result.

Unique file names

You can use pattern in the local file name as described in the fsu module

License: MIT

2.0.0

5 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

8 years ago

1.0.0

8 years ago