streaming-tar
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

streaming-tar

A pure-TypeScript streaming Tar parser for Web-compatible JavaScript runtimes.

downloads npm version MIT license

import * as tar from "streaming-tar";

const resp = await fetch("https://registry.npmjs.org/react/-/react-18.2.0.tgz");
const tarStream = resp.body.pipeThrough(new DecompressionStream("gzip"));

for await (const entry of tar.entries(tarStream)) {
  const contents = await entry.text();
  console.log(entry.name, contents);
}

Features

  • Streaming support
  • Supports Node.js, Deno, Cloudflare Workers, and other Web-compatible JavaScript runtimes
  • Zero dependencies
  • Small footprint, less than 1KB minified and gzipped.

Requirements

  • A Web-compatible JavaScript runtime (Node.js, Deno, Bun, Cloudflare Workers, etc.)

Installation

Via npm:

npm install streaming-tar

Via yarn:

yarn add streaming-tar

Via pnpm:

pnpm add streaming-tar

Via deno:

import * as tar from "https://deno.land/x/streaming_tar/mod.ts";

Readme

Keywords

none

Package Sidebar

Install

npm i streaming-tar

Weekly Downloads

16

Version

0.1.1

License

MIT

Unpacked Size

19.1 kB

Total Files

17

Last publish

Collaborators

  • zebp