# downloadts

> A tiny library for downloading files from the browser programatically.

Latest version **1.0.0** (published 2023-03-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install downloadts
pnpm add downloadts
yarn add downloadts
bun add downloadts
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-03-10 |
| First published | 2023-03-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ej-shafran |
| Maintainers | ej-shafran |

## Links

- npm: https://www.npmjs.com/package/downloadts
- npm.io page: https://npm.io/package/downloadts

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^1.3.4

## Recent versions

- 1.0.0 (latest) — 2023-03-10

## README

# download-ts

A tiny NPM package that allows you to download files to the user's computer.

## Installation

```bash
npm install download-ts
```

## Usage

```typescript
import { downlaod } from "download-ts";

// can be used to download using a URL
download("/images/banana.jpg");
// by default, this example will download a file and name it "banana.jpg",
// but you can change the name by passing a second parameter:
download("/images/banana.jpg", "not-a-banana.jpg");
// and for a third argument, you can pass an AxiosRequestConfig
download("http://www.my-proxy-server.com", "banana.jpg", {
  headers: {
    "Target-URL": "https://www.some-other-server.com/images/banana.jpg",
  },
});

// or a blob
download(blob, "my-filename.txt"); // where `blob` is a Blob
```

---
_Source: https://npm.io/package/downloadts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
