How to use the jszip.default 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 galaxyproject / galaxy / config / plugins / visualizations / openlayers / src / script.js View on Github external
JSZipUtils.getBinaryContent(url, function(err, data) {
            let URL = window.URL || window.webkitURL || window.mozURL || window.msURL
            let shpString, dbfString, prjString;
            let zip = new JSZip.default();
            zip.loadAsync(data)
                .then(function(zipFiles) {
                    shpString = zipFiles.file(/.shp$/i)[0].name;
                    dbfString = zipFiles.file(/.dbf$/i)[0].name;
                    
                    zipFiles.file(shpString).async('arraybuffer').then(function (content) {
                        SHPParser.load(URL.createObjectURL(new Blob([content])), shpLoader, returnData);
                    });
                    
                    zipFiles.file(dbfString).async('arraybuffer').then(function (content) {
                        DBFParser.load(URL.createObjectURL(new Blob([content])), encoding, dbfLoader, returnData);
                    });
                })
        });
    }

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