Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

docx-stream-template

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docx-stream-template - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "docx-stream-template",
"version": "1.0.1",
"version": "1.0.2",
"description": "Simple stream template engine for create docx files in NodeJS",

@@ -5,0 +5,0 @@ "main": "template.js",

@@ -6,3 +6,3 @@ const Template = require('stream-text-variable-template');

function docxTemplate(props, docx) {
const archive = new zip({ zlib: { level: 1 } });
const archive = new zip({ zlib: { level: 0 } });
docx.pipe(unzip.Parse()).

@@ -13,7 +13,11 @@ on('entry', function (entry) {

const stream = entry.pipe(new Template(props));
archive.entry(stream, { name: fileName });
process.nextTick(() => archive.entry(stream, { name: fileName }));
} else {
archive.entry(entry, { name: fileName });
if (fileName === '[Content_Types].xml') {
archive.finalize();
process.nextTick(() => {
archive.entry(entry, { name: fileName })
archive.finalize();
});
} else {
process.nextTick(() => archive.entry(entry, { name: fileName }));
}

@@ -20,0 +24,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc