aboutsummaryrefslogtreecommitdiff
path: root/lib/zipfile.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-08-12 21:32:41 +0100
committerMichael Williamson <mike@zwobble.org>2015-08-12 21:32:41 +0100
commit5f5217a4e16f7be697b24a46cf58e47753967d95 (patch)
tree5fa3113cf65ee3e3c554060b54a86cfe954f0a19 /lib/zipfile.js
parentf71f3ea07839011e2fd60402069917e4fc2bed93 (diff)
Initial support for writing style maps to docx files
Diffstat (limited to 'lib/zipfile.js')
-rw-r--r--lib/zipfile.js13
1 files changed, 12 insertions, 1 deletions
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
};
}