Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

downloader-race

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

downloader-race

download race

  • 3.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

downloader-race

npm version npm downloads

nodejs 下载竞速工具, Node.js-开发实践:下载文件

install

安装

npm install downloader-race

use

使用

// 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
    • 说明: 下载成功后返回目标路径
// download race
const res = await downloadRace(url, dest, options);

Keywords

FAQs

Package last updated on 05 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc