Skip to content

rawnly/simple-download

Repository files navigation

Simple Download

Download files with ease. (No dependencies!)

Wallaby.js

Install

	npm install simple-download

	# or

	yarn add simple-download

Usage

	import download from 'simple-download'

	const url = 'https://httpbin.org/image/png'

	await download(url, '~/Desktop/my-image.png') //=> Promise<string | Buffer>

API

url

  • Type: string
  • required: true

path

  • Type: string
  • required: true
  • Note: It must have the file name. (ex: ~/Desktop/my-image.png)