node-wget-promise
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/node-wget-promise package

0.1.6 • Public • Published

node-wget-promise

node-wget-promise simplifies retrieving files from any URL, with Promise support.

npm Build Status styled with prettier

This package is forked and enhanced from wget-improved

Installation

npm install node-wget-promise --save

Usage

The simpliest example

const wget = require('node-wget-promise');
 
wget('http://nodejs.org/images/logo.svg');

The basic example with callbacks

const wget = require('node-wget-promise');
 
wget([url], {
    onStart: [Callback],
    onProgress: [Callback],
    output: [outputFilePath]
  })
  .then(metadata => [fileMetadata])
  .catch(err => [Error]);

Work with async-await syntax

const wget = require('node-wget-promise');
 
(async () => {
  await wget([url]);
  console.log('Done');
})();

Package Sidebar

Install

npm i node-wget-promise

Weekly Downloads

880

Version

0.1.6

License

MIT

Unpacked Size

57.9 kB

Total Files

9

Last publish

Collaborators

  • ajhsu