How to use the jszip.JSZip 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 owtf / owtf / owtf / webui / src / Report / Export.js View on Github external
function getDocxReportFromJSON(json, template) {
    let zip = new JSZip(templates[template]);
    let doc = new Docxtemplater();
    doc.loadZip(zip);

    //set the templateVariables
    doc.setData(json);

    try {
        // render the document (replace all occurences of tags.
        doc.render()
    } catch (error) {
        let e = {
            message: error.message,
            name: error.name,
            stack: error.stack,
            properties: error.properties
        }

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