From 5f5217a4e16f7be697b24a46cf58e47753967d95 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 12 Aug 2015 21:32:41 +0100 Subject: Initial support for writing style maps to docx files --- lib/zipfile.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'lib/zipfile.js') diff --git a/lib/zipfile.js b/lib/zipfile.js index 2c004b7..eb6bf66 100644 --- a/lib/zipfile.js +++ b/lib/zipfile.js @@ -19,9 +19,20 @@ function openArrayBuffer(arrayBuffer) { return promises.when(buffer); } } + + function write(name, contents) { + zipFile.file(name, contents); + } + + function toBuffer() { + return zipFile.generate({type: "nodebuffer"}); + } + return { exists: exists, - read: read + read: read, + write: write, + toBuffer: toBuffer }; } -- cgit v1.2.3