# web-file-polyfill

> Web API compatible File implementation for node

Latest version **1.0.4** (published 2021-07-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install web-file-polyfill
pnpm add web-file-polyfill
yarn add web-file-polyfill
bun add web-file-polyfill
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2021-07-27 |
| First published | 2020-07-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 25 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Irakli Gozalishvili |
| Maintainers | gozala, ipfs-npm-publisher-bot |
| Keywords | file, blob, typed, typescript |

## Links

- npm: https://www.npmjs.com/package/web-file-polyfill
- Repository: https://github.com/Gozala/web-file
- Homepage: https://github.com/Gozala/web-file#readme
- Issues: https://github.com/Gozala/web-file/issues
- npm.io page: https://npm.io/package/web-file-polyfill

## Dependencies (1)

- [web-blob](https://npm.io/package/web-blob.md) 2.1.3

## 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.4 (latest) — 2021-07-27
- 1.0.3 — 2021-07-27
- 1.0.2 — 2021-06-17
- 1.0.1 — 2020-07-20
- 1.0.0 — 2020-07-20

## README

# web-file

## Status

Deprecated: This library was superseeded by [@web-std/file](https://www.npmjs.com/package/@web-std/file). Please use that library instead.

![Node.js CI][node.js ci]
[![package][version.icon] ![downloads][downloads.icon]][package.url]
[![styled with prettier][prettier.icon]][prettier.url]

Web API compatible [File][] for nodejs.

### Usage

```js
import { File, Blob } from "web-file-polyfill"
const file = new File(["hello", new TextEncoder().encode("world")], "hello")
for await (const chunk of blob.stream()) {
  console.log(chunk)
}
```

### Usage from Typescript

This library makes use of [typescript using JSDOC annotations][ts-jsdoc] and
also generates type difinitions along with typed definition maps. So you should
be able to get all the type innference out of the box.

## Install

    npm install web-file-polyfill

[node.js ci]: https://github.com/Gozala/web-file-polyfill/workflows/Node.js%20CI/badge.svg
[version.icon]: https://img.shields.io/npm/v/web-file-polyfill.svg
[downloads.icon]: https://img.shields.io/npm/dm/web-file-polyfill.svg
[package.url]: https://npmjs.org/package/web-file-polyfill
[downloads.image]: https://img.shields.io/npm/dm/web-file-polyfill.svg
[downloads.url]: https://npmjs.org/package/web-file-polyfill
[prettier.icon]: https://img.shields.io/badge/styled_with-prettier-ff69b4.svg
[prettier.url]: https://github.com/prettier/prettier
[blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob
[fetch-blob]: https://github.com/node-fetch/fetch-blob
[readablestream]: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
[readable]: https://nodejs.org/api/stream.html#stream_readable_streams
[file]: https://w3c.github.io/FileAPI/
[for await]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
[buffer]: https://nodejs.org/api/buffer.html
[weakmap]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap
[ts-jsdoc]: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html

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