0.1.0 • Published 6 months ago

@esmkit/web-file v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

@esmkit/web-file

Web API compatible File for nodejs.

Usage

import { File, Blob } from "@esmkit/web-file";
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 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 @esmkit/web-file