https://github.com/ajhsu/node-wget-promise
Using wget in Node, with Promise support.
https://github.com/ajhsu/node-wget-promise
nodejs promise wget
Last synced: 4 months ago
JSON representation
Using wget in Node, with Promise support.
- Host: GitHub
- URL: https://github.com/ajhsu/node-wget-promise
- Owner: ajhsu
- License: mit
- Created: 2018-02-09T04:02:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-17T05:07:27.000Z (over 6 years ago)
- Last Synced: 2025-05-24T18:17:53.866Z (5 months ago)
- Topics: nodejs, promise, wget
- Language: JavaScript
- Homepage:
- Size: 95.7 KB
- Stars: 8
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-wget-promise
`node-wget-promise` simplifies retrieving files from any URL, with Promise support.
[](https://www.npmjs.com/package/node-wget-promise)
[](https://travis-ci.org/ajhsu/node-wget-promise)
[](https://github.com/prettier/prettier)> This package is forked and enhanced from [wget-improved](https://github.com/bearjaws/node-wget)
## Installation
```
npm install node-wget-promise --save
```## Usage
### The simpliest example
```js
const wget = require('node-wget-promise');wget('http://nodejs.org/images/logo.svg');
```### The basic example with callbacks
```js
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
```js
const wget = require('node-wget-promise');(async () => {
await wget([url]);
console.log('Done');
})();
```