New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dl-easy

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dl-easy

Simply download file in electron application

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

dl-easy

English | 简体中文

Introduction

Simply download file in electron application.

Install

$   npm install dl-easy --save

Usage

# 1. CommonJs 
const { download } = require('dl-easy')
# 2. ES6
import { download } from 'dl-easy'

# basic usage
const { remote } = require('electron')
download(remote.getCurrentWindow(), url)
  .then(file => {
    // download success
  })
  .catch(err => {
    // download fail  
  })

# with callback
download(remote.getCurrentWindow(), url, {
  'onStart': (file) => { 
    // download has started
  },
  'onCancel': (fileObj) => { 
    // download has canceled
  }
})
  .then(file => {
    // download success
  })
  .catch(err => {
    // download fail  
  })

Keywords

download

FAQs

Package last updated on 03 Jan 2019

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