zipizape

ES6 wrapper for zip.js

Usage no npm install needed!

<script type="module">
  import zipizape from 'https://cdn.skypack.dev/zipizape';
</script>

README

Logo

zipizape Build Status

Extract zip contents in the browser with ease

Demo

https://zzarcon.github.io/zipizape

Install

$ yarn add zipizape

Usage

import {ZipiZape} from 'zipizape';

const zipizape = new ZipiZape();
const entries = await zipizape.readFile(event.target.files[0])

for (let entry of entries) {
  const content = await entry.getContent();

  console.log(content.type, content.blob)
}

API

ZipiZape

readFile(file: File): Promise<Entry[]>

Entry

getContent(): Promise<EntryContent | undefined>

EntryContent = {
  blob: Blob
  type: string
}

Credits

Zipizape uses jszip as the zip reader engine, much love to them for building such a great project 💖