Skip to content

Instantly share code, notes, and snippets.

@royashbrook

royashbrook/JSZip.js

Created Sep 16, 2020
Embed
What would you like to do?
From JSZip to unzipit
//import or add cdn for global, url should be passed in somehow
fetch(url)
.then(r=>r.blob())
.then(JSZip.loadAsync)
.then(zip=>zip.files[Object.keys(zip.files)[0]].async('string'))
.then(JSON.parse)
//import or add cdn for global, url should be passed in somehow
unzip(url)
.then(x => x.entries[Object.keys(x.entries)[0]])
.then(x => x.blob())
.then(x => x.text())
.then(JSON.parse)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.