How to use the jszip/dist/jszip.min.js function in jszip

To help you get started, we’ve selected a few jszip examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github seiyria / deck.zone / src / app / create-results / create-results.component.ts View on Github external
public async downloadImages() {
    this.isDownloading = true;

    const scriptName = this.project.scripts[this.displayScript || this.project.activeScript].name;

    const zip = new JSZip();

    const gameCards = this.gameCards.map(x => x.nativeElement);
    let curIdx = 0;
    let curBack = 0;
    let curFront = 0;

    const convertPromises = [];

    gameCards.forEach(async value => {
      const cardRef = this.cardDisplayList[curIdx++];
      const imgStringPromise = domtoimage.toBlob(value);

      const num = cardRef._front ? curFront : curBack;

      if(cardRef._front) curFront++;
      else               curBack++;
github felipemanga / ProjectABE / src / components / Debugger.js View on Github external
zip(){
	
	var zip = new JSZip();
	let source = this.source.data;
	
	for( let name in source )
	    zip.file( name, source[name]);
	
	zip.generateAsync({type:"blob"})
	    .then( content => {
		
		if( !this.saver ){
		    
		    let dom = new DOM(this.DOM.create("div", {
			id:"el",
			className:"FileSaver",
			onclick:_=>this.saver.el.style.display = "none"
		    }, [
			["a", {
github seiyria / deck.zone / src / app / create-toolbar / create-toolbar.component.ts View on Github external
download() {
    const zip = new JSZip();

    values(this.project.scripts).forEach(script => {
      zip.file(this.replaceName(script.name), script.contents);
    });

    zip.generateAsync({ type: 'blob' })
      .then((blob) => {
        saveAs(blob, `${this.project.name}-${Date.now()}.zip`);
      });
  }

jszip

Create, read and edit .zip files with JavaScript http://stuartk.com/jszip

(MIT OR GPL-3.0-or-later)
Latest version published 2 years ago

Package Health Score

80 / 100
Full package analysis