Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

downl

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

downl

download stuff

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
0
Created
Source

downl

download stuff

Installation

Install downl using your favorite package manager:

npm install downl

Usage

Mostly the same API as https://github.com/kevva/download except for the extract option (which takes an object with the options to pass to https://github.com/kevva/decompress instead of a boolean).

import download from 'downl';
import fs from 'node:fs'

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')));

FAQs

Package last updated on 30 Sep 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