https://github.com/rawnly/simple-download
Download files
https://github.com/rawnly/simple-download
Last synced: 7 months ago
JSON representation
Download files
- Host: GitHub
- URL: https://github.com/rawnly/simple-download
- Owner: rawnly
- Created: 2016-12-26T15:16:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T04:13:23.000Z (over 3 years ago)
- Last Synced: 2024-12-28T09:43:23.662Z (over 1 year ago)
- Language: TypeScript
- Size: 4.21 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Download
> Download files with ease. (No dependencies!)
[](https://wallabyjs.com/oss/)
## Install
```bash
npm install simple-download
# or
yarn add simple-download
```
## Usage
```ts
import download from 'simple-download'
const url = 'https://httpbin.org/image/png'
await download(url, '~/Desktop/my-image.png') //=> Promise
```
## API
### url
- Type: `string`
- required: `true`
### path
- Type: `string`
- required: `true`
- Note: It must have the file name. (ex: `~/Desktop/my-image.png`)