nodeStream(type[, onUpdate])

Return a nodejs Streams3 of the content in the asked type.

Returns : a nodejs Streams3.

Arguments

name type default description
type String nodebuffer only nodebuffer is currently supported.
onUpdate Function   an optional function called on each internal update with the metadata.

Metadata : see the metadata of async().

Example

zip
.file("my_text.txt")
.nodeStream()
.pipe(fs.createWriteStream('/tmp/my_text.txt'))
.on('finish', function () {
    // JSZip generates a readable stream with a "end" event,
    // but is piped here in a writable stream which emits a "finish" event.
    console.log("text file written.");
});