2.0.4 • Published 2 years ago

simpledownload v2.0.4

Weekly downloads
4
License
MIT
Repository
github
Last release
2 years ago

Node.js CI

Install

npm install simpledownload

Usage

import {simpledownload} from 'simpledownload'
await simpledownload('https://www.google.co.jp/images/srpr/logo11w.png', `${__dirname}/1.jpg`);

simpledownload(url: string, localPath: string, options?: {timeout, agent}): Promise\<void>

  • url - the url you wanna download. e.g https://www.google.co.jp/images/srpr/logo11w.png
  • localPath - e.g `${__dirname}/1.jpg`
  • options.timeout - use millisecond. If timeout, err.timeout would exist.
  • options.agent - http.Agent. For example, you can use node-socks-proxy-agent to enable socks5 proxy.

license

MIT

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

10 years ago

1.0.0

10 years ago