2.0.6 • Published 1 year ago
simpledownload v2.0.6
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.ghttps://www.google.co.jp/images/srpr/logo11w.pnglocalPath- e.g`${__dirname}/1.jpg`options.timeout- use millisecond. If timeout,err.timeoutwould exist.options.agent-http.Agent. For example, you can usenode-socks-proxy-agentto enable socks5 proxy.
dev
$ npm run test- bump package.json version
$ npm publish
license
MIT