# @writetome51/get-data-urls

> Async function that returns data URLs representing each File from a passed array of Files

Latest version **1.0.0** (published 2020-08-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @writetome51/get-data-urls
pnpm add @writetome51/get-data-urls
yarn add @writetome51/get-data-urls
bun add @writetome51/get-data-urls
```

## 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.0.0 |
| Published | 2020-08-07 |
| First published | 2019-06-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Steve Thompson |
| Maintainers | writetome51 |
| Keywords | data-url, data, url, array, files, file, list |

## Links

- npm: https://www.npmjs.com/package/@writetome51/get-data-urls
- Repository: https://github.com/writetome51/get-data-urls
- Homepage: https://github.com/writetome51/get-data-urls#readme
- Issues: https://github.com/writetome51/get-data-urls/issues
- npm.io page: https://npm.io/package/@writetome51/get-data-urls

## Dependencies (1)

- [@writetome51/get-data-url](https://npm.io/package/@writetome51/get-data-url.md) ^1.0.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-08-07
- 0.0.2 — 2020-01-22
- 0.0.1 — 2019-06-16

## README

# getDataURLs(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;files: File[] | FileList<br>): Promise<string[]>

An async function that gets an array of data URLs generated from `files`.


## Example

```html
<!--  In the html, get array of Files from a file input and pass it to
    a function:  
-->
<p>Choose files to generate data urls from:</p>
<input type="file" multiple  (change)="addToURLs($event.target.files)"/>
```

```ts
// In a javascript component:

async addToURLs(files) {
     let urls = await getDataURLs(files);
     this.dataURLs.push(...urls);
}
```

## Installation

```bash
npm i  @writetome51/get-data-urls
```

## Loading
```js
import {getDataURLs} from '@writetome51/get-data-urls';
```

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