All Projects → kevva → Download

kevva / Download

Licence: mit
Download and extract files

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Download

Bach
Compose your async functions with elegance.
Stars: ✭ 117 (-89%)
Mutual labels:  async, stream, promise
Write
Write data to the file system, creating any intermediate directories if they don't already exist. Used by flat-cache and many others!
Stars: ✭ 68 (-93.61%)
Mutual labels:  async, stream, promise
Node Fetch
A light-weight module that brings the Fetch API to Node.js
Stars: ✭ 7,176 (+574.44%)
Mutual labels:  stream, promise
Wx Promise Pro
✨强大、优雅的微信小程序异步库🚀
Stars: ✭ 762 (-28.38%)
Mutual labels:  async, promise
Vue Loadable
⏳ Improve your loading state control with pretty simple methods and helpers.
Stars: ✭ 23 (-97.84%)
Mutual labels:  async, promise
Before After Hook
wrap methods with before/after hooks
Stars: ✭ 49 (-95.39%)
Mutual labels:  async, promise
P Map
Map over promises concurrently
Stars: ✭ 639 (-39.94%)
Mutual labels:  async, promise
Then
🎬 Tame async code with battle-tested promises
Stars: ✭ 908 (-14.66%)
Mutual labels:  async, promise
Fun Task
Abstraction for managing asynchronous code in JS
Stars: ✭ 363 (-65.88%)
Mutual labels:  async, promise
Dropbox Stream
Upload & Download streams for Dropbox
Stars: ✭ 35 (-96.71%)
Mutual labels:  stream, download
Create Request
Apply interceptors to `fetch` and create a custom request function.
Stars: ✭ 34 (-96.8%)
Mutual labels:  async, promise
Emacs Async Await
Async/Await for Emacs
Stars: ✭ 47 (-95.58%)
Mutual labels:  async, promise
Posterus
Composable async primitives with cancelation, control over scheduling, and coroutines. Superior replacement for JS Promises.
Stars: ✭ 536 (-49.62%)
Mutual labels:  async, promise
Kneden
Transpile ES2017 async/await to vanilla ES6 Promise chains: a Babel plugin
Stars: ✭ 517 (-51.41%)
Mutual labels:  async, promise
Awaitkit
The ES8 Async/Await control flow for Swift
Stars: ✭ 709 (-33.36%)
Mutual labels:  async, promise
React Hooks Async
React custom hooks for async functions with abortability and composability
Stars: ✭ 459 (-56.86%)
Mutual labels:  async, promise
Ws Promise Client
PROJECT MOVED: https://github.com/kdex/ws-promise
Stars: ✭ 6 (-99.44%)
Mutual labels:  async, promise
Breeze
Javascript async flow control manager
Stars: ✭ 38 (-96.43%)
Mutual labels:  async, promise
Pyinstalive
Python script to download Instagram livestreams and replays.
Stars: ✭ 336 (-68.42%)
Mutual labels:  stream, download
P Iteration
Utilities that make array iteration easy when using async/await or Promises
Stars: ✭ 337 (-68.33%)
Mutual labels:  async, promise

download Build Status

Download and extract files

See download-cli for the command-line version.

Install

$ npm install download

Usage

const fs = require('fs');
const download = require('download');

(async () => {
	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')));
})();

Proxies

To work with proxies, read the got documentation.

API

download(url, destination?, options?)

Returns both a Promise<Buffer> and a Duplex stream with additional events.

url

Type: string

URL to download.

destination

Type: string

Path to where your file will be written.

options

Type: Object

Same options as got and decompress in addition to the ones below.

extract

Type: boolean
Default: false

If set to true, try extracting the file using decompress.

filename

Type: string

Name of the saved file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].