Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@web-std/file

web-std421.8kMIT3.0.3TypeScript support: included

Web API compatible File implementation for node

file, blob, typed, typescript

readme

web-file

ci package downloads styled with prettier

Web API compatible File for nodejs.

Usage

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