JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q39605F
  • License Apache-2.0

Generate a tarball file in-memory

Package Exports

  • @ronin/tarball
  • @ronin/tarball/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ronin/tarball) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

RONIN Tarball

tests code coverage install size

This package generates a tarball file in-memory, with the ability to compress it using gzip.

Usage

import { createTarball } from '@ronin/tarball';

const files = [
  {
    name: 'hello.txt',
    contents: new TextEncoder().encode('Hello World'),
  },
];

const tarball = createTarball(files);
//       ^? { name: null, data: Uint8Array<ArrayBuffer> }

Testing

Use the following command to run the test suite:

bun test