File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,9 @@ See `addFile()` for the meaning of `mtime` and `mode`.
100
100
If ` size ` is given, it will be checked against the actual number of bytes in the ` readStream ` ,
101
101
and an error will be emitted if there is a mismatch.
102
102
103
+ Note that yazl will ` .pipe() ` data from ` readStream ` , so be careful using ` .on('data') ` .
104
+ In certain versions of node, ` .on('data') ` makes ` .pipe() ` behave incorrectly.
105
+
103
106
#### addBuffer(buffer, metadataPath, [ options] )
104
107
105
108
Adds a file to the zip file whose content is ` buffer ` .
@@ -169,6 +172,9 @@ Data becomes available in this stream soon after calling one of `addFile()`, `ad
169
172
Clients can call ` pipe() ` on this stream at any time,
170
173
such as immediately after getting a new ` ZipFile ` instance, or long after calling ` end() ` .
171
174
175
+ As a reminder, be careful using both ` .on('data') ` and ` .pipe() ` with this stream.
176
+ In certain versions of node, you cannot use both ` .on('data') ` and ` .pipe() ` successfully.
177
+
172
178
### dateToDosDateTime(jsDate)
173
179
174
180
` jsDate ` is a ` Date ` instance.
You can’t perform that action at this time.
0 commit comments