js-file-download

WebJar for js-file-download

Лицензия

Лицензия

MIT
Категории

Категории

JavaScript Языки программирования
Группа

Группа

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

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

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

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

0.4.12
Дата

Дата

Тип

Тип

jar
Описание

Описание

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

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

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

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

https://github.com/kennethjiang/js-file-download

Скачать js-file-download

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

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

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

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

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

Javascript File Download

Javascript function to trigger browser to save data to file as if it was downloaded.

Installation

npm install js-file-download --save

Usage

var fileDownload = require('js-file-download');
fileDownload(data, 'filename.csv');

Binary downloads

When downloading binary data, the data must be a Blob, otherwise the downloaded file will be corrupted. For example, using Axios:

import Axios from axios;
import fileDownload from 'js-file-download';

function download(url: string, filename: string) {
  Axios.get(url, {
    responseType: 'blob',
  }).then(res => {
    fileDownload(res.data, filename);
  });
}

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

Версия
0.4.12
0.4.11
0.4.9
0.4.8
0.4.7
0.4.5
0.4.4
0.4.1