-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I'm in a Node environment, asBlob gets a Blob object. I expect a buffer, how do I configure it?
const blob = await HtmlDocx.asBlob(htmlText);I noticed the presence of the global attribute, but I don't know how to change it
generateDocument: function(zip) {
var buffer;
buffer = zip.generate({
type: 'arraybuffer'
});
if (global.Blob) {
return new Blob([buffer], {
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
});
} else if (global.Buffer) {
return new Buffer(new Uint8Array(buffer));
} else {
throw new Error("Neither Blob nor Buffer are accessible in this environment. " + "Consider adding Blob.js shim");
}
},Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels