# url-to-file

> A utility to convert url to file.

Latest version **1.1.0** (published 2021-08-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install url-to-file
pnpm add url-to-file
yarn add url-to-file
bun add url-to-file
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2021-08-11 |
| First published | 2021-08-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | alfredosalzillo |
| Maintainers | alfredo.salzillo |

## Links

- npm: https://www.npmjs.com/package/url-to-file
- Repository: https://github.com/alfredosalzillo/url-to-file
- Homepage: https://github.com/alfredosalzillo/url-to-file#readme
- Issues: https://github.com/alfredosalzillo/url-to-file/issues
- npm.io page: https://npm.io/package/url-to-file

## Recent versions

- 1.1.0 (latest) — 2021-08-11
- 1.0.0 — 2021-08-11

## README

# url-to-file

![CI/CD](https://github.com/alfredosalzillo/url-to-file/workflows/CI/CD/badge.svg)
[![npm version](https://badge.fury.io/js/url-to-file.svg)](https://badge.fury.io/js/rollup-plugin-multi-input)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

A utility to convert url to file.

## Install

Install via npm or yarn.

```bash
npm i -D url-to-file
yarn add url-to-file
```

## API

### fetchFile

Fetch an url and return a File object.

```javascript
import { fetchFile } from 'url-to-file'

const file = await fetchFile('https://picsum.photos/200/300', 'image.png', {
   type: 'image/png',
})
```

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