# downloader-race

> download race

Latest version **3.1.0** (published 2023-05-05) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install downloader-race
pnpm add downloader-race
yarn add downloader-race
bun add downloader-race
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2023-05-05 |
| First published | 2023-05-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | uikoo9 |
| Maintainers | npm_insistime |
| Keywords | download race, download fast |

## Links

- npm: https://www.npmjs.com/package/downloader-race
- Repository: https://github.com/uikoo9/qiao-download
- Homepage: https://code.insistime.com/downloader-race
- Issues: https://github.com/uikoo9/qiao-download/issues
- npm.io page: https://npm.io/package/downloader-race

## Dependencies (2)

- [qiao-file](https://npm.io/package/qiao-file.md) ^3.1.6
- [qiao-downloader](https://npm.io/package/qiao-downloader.md) ^3.1.0

## Recent versions

- 3.1.0 (latest) — 2023-05-05

## README

## downloader-race

[![npm version](https://img.shields.io/npm/v/downloader-race.svg?style=flat-square)](https://www.npmjs.org/package/downloader-race)
[![npm downloads](https://img.shields.io/npm/dm/downloader-race.svg?style=flat-square)](https://npm-stat.com/charts.html?package=downloader-race)

nodejs 下载竞速工具, [Node.js-开发实践：下载文件](https://blog.insistime.com/nodejs-download)

## install

安装

```shell
npm install downloader-race
```

## use

使用

```javascript
// cjs
const { downloadRace } = require('downloader-race');

// mjs
import { downloadRace } from 'downloader-race';
```

## downloadRace

下载竞速工具

- url
  - 类型: string
  - 说明: 下载文件的 url
- dest
  - 类型: string
  - 说明: 下载文件的目标路径
- options
  - options.times
    - 类型: number
    - 说明: 并行下载次数，默认为 2
  - options.timeout
    - 类型: number
    - 说明: 下载文件的超时时间，单位 ms
  - options.onProgress
    - 类型: function
    - 说明: 下载进度，返回保留 3 位的小数
- return
  - 类型: string
  - 说明: 下载成功后返回目标路径

```javascript
// download race
const res = await downloadRace(url, dest, options);
```

---
_Source: https://npm.io/package/downloader-race · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
