download

WebJar for download

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

download
Последняя версия

Последняя версия

6.2.5
Дата

Дата

Тип

Тип

jar
Описание

Описание

download
WebJar for download
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/kevva/download

Скачать download

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/download/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>download</artifactId>
    <version>6.2.5</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/download/
implementation 'org.webjars.npm:download:6.2.5'
// https://jarcasting.com/artifacts/org.webjars.npm/download/
implementation ("org.webjars.npm:download:6.2.5")
'org.webjars.npm:download:jar:6.2.5'
<dependency org="org.webjars.npm" name="download" rev="6.2.5">
  <artifact name="download" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='download', version='6.2.5')
)
libraryDependencies += "org.webjars.npm" % "download" % "6.2.5"
[org.webjars.npm/download "6.2.5"]

Зависимости

compile (11)

Идентификатор библиотеки Тип Версия
org.webjars.npm : pify jar [3.0.0,4)
org.webjars.npm : content-disposition jar [0.5.2,0.6)
org.webjars.npm : decompress jar [4.0.0,5)
org.webjars.npm : get-stream jar [3.0.0,4)
org.webjars.npm : make-dir jar [1.0.0,2)
org.webjars.npm : ext-name jar [5.0.0,6)
org.webjars.npm : file-type jar 5.2.0
org.webjars.npm : got jar [7.0.0,8)
org.webjars.npm : filenamify jar [2.0.0,3)
org.webjars.npm » p-event jar [1.0.0,2)
org.webjars.npm : caw jar [2.0.0,3)

Модули Проекта

Данный проект не имеет модулей.

download Build Status

Download and extract files

See download-cli for the command-line version.

Install

$ npm install download

Usage

const fs = require('fs');
const download = require('download');

(async () => {
	await download('http://unicorn.com/foo.jpg', 'dist');

	fs.writeFileSync('dist/foo.jpg', await download('http://unicorn.com/foo.jpg'));

	download('unicorn.com/foo.jpg').pipe(fs.createWriteStream('dist/foo.jpg'));

	await Promise.all([
		'unicorn.com/foo.jpg',
		'cats.com/dancing.gif'
	].map(url => download(url, 'dist')));
})();

Proxies

To work with proxies, read the got documentation.

API

download(url, destination?, options?)

Returns both a Promise<Buffer> and a Duplex stream with additional events.

url

Type: string

URL to download.

destination

Type: string

Path to where your file will be written.

options

Type: Object

Same options as got and decompress in addition to the ones below.

extract

Type: boolean
Default: false

If set to true, try extracting the file using decompress.

filename

Type: string

Name of the saved file.

Версии библиотеки

Версия
6.2.5
4.2.0