: Use zip.generateAsync({type: "blob"}) to compile the data into a downloadable archive.
If your goal is to programmatically generate or manage ZIP files (like a "Gorescript.zip") using JavaScript, you can use the library: File: Gorescript.zip ...
If you are creating gameplay content (like levels or mods), keep these core design elements in mind: : Use zip