@@ -291,7 +291,7 @@ for (let i = 0; i < 100; i++) {
291
291
}
292
292
writer .end (' This is the end\n ' );
293
293
writer .on (' finish' , () => {
294
- console .error (' All writes are now complete.' );
294
+ console .log (' All writes are now complete.' );
295
295
});
296
296
```
297
297
@@ -309,7 +309,7 @@ a readable stream, adding this writable to its set of destinations.
309
309
const writer = getWritableStreamSomehow ();
310
310
const reader = getReadableStreamSomehow ();
311
311
writer .on (' pipe' , (src ) => {
312
- console .error ( ' something is piping into the writer' );
312
+ console .log ( ' Something is piping into the writer. ' );
313
313
assert .equal (src, reader);
314
314
});
315
315
reader .pipe (writer);
@@ -334,7 +334,7 @@ This is also emitted in case this [`Writable`][] stream emits an error when a
334
334
const writer = getWritableStreamSomehow ();
335
335
const reader = getReadableStreamSomehow ();
336
336
writer .on (' unpipe' , (src ) => {
337
- console .error (' Something has stopped piping into the writer.' );
337
+ console .log (' Something has stopped piping into the writer.' );
338
338
assert .equal (src, reader);
339
339
});
340
340
reader .pipe (writer);
@@ -551,7 +551,7 @@ function write(data, cb) {
551
551
552
552
// Wait for cb to be called before doing any other write.
553
553
write (' hello' , () => {
554
- console .log (' write completed, do more writes now' );
554
+ console .log (' Write completed, do more writes now. ' );
555
555
});
556
556
```
557
557
@@ -1091,7 +1091,7 @@ const readable = getReadableStreamSomehow();
1091
1091
readable .setEncoding (' utf8' );
1092
1092
readable .on (' data' , (chunk ) => {
1093
1093
assert .equal (typeof chunk, ' string' );
1094
- console .log (' got %d characters of string data' , chunk .length );
1094
+ console .log (' Got %d characters of string data: ' , chunk .length );
1095
1095
});
1096
1096
```
1097
1097
@@ -1119,9 +1119,9 @@ const writable = fs.createWriteStream('file.txt');
1119
1119
// but only for the first second
1120
1120
readable .pipe (writable);
1121
1121
setTimeout (() => {
1122
- console .log (' Stop writing to file.txt' );
1122
+ console .log (' Stop writing to file.txt. ' );
1123
1123
readable .unpipe (writable);
1124
- console .log (' Manually close the file stream' );
1124
+ console .log (' Manually close the file stream. ' );
1125
1125
writable .end ();
1126
1126
}, 1000 );
1127
1127
```
@@ -1338,9 +1338,9 @@ const rs = fs.createReadStream('archive.tar');
1338
1338
1339
1339
finished (rs, (err ) => {
1340
1340
if (err) {
1341
- console .error (' Stream failed' , err);
1341
+ console .error (' Stream failed. ' , err);
1342
1342
} else {
1343
- console .log (' Stream is done reading' );
1343
+ console .log (' Stream is done reading. ' );
1344
1344
}
1345
1345
});
1346
1346
@@ -1360,7 +1360,7 @@ const rs = fs.createReadStream('archive.tar');
1360
1360
1361
1361
async function run () {
1362
1362
await finished (rs);
1363
- console .log (' Stream is done reading' );
1363
+ console .log (' Stream is done reading. ' );
1364
1364
}
1365
1365
1366
1366
run ().catch (console .error );
@@ -1395,9 +1395,9 @@ pipeline(
1395
1395
fs .createWriteStream (' archive.tar.gz' ),
1396
1396
(err ) => {
1397
1397
if (err) {
1398
- console .error (' Pipeline failed' , err);
1398
+ console .error (' Pipeline failed. ' , err);
1399
1399
} else {
1400
- console .log (' Pipeline succeeded' );
1400
+ console .log (' Pipeline succeeded. ' );
1401
1401
}
1402
1402
}
1403
1403
);
@@ -1414,7 +1414,7 @@ async function run() {
1414
1414
zlib .createGzip (),
1415
1415
fs .createWriteStream (' archive.tar.gz' )
1416
1416
);
1417
- console .log (' Pipeline succeeded' );
1417
+ console .log (' Pipeline succeeded. ' );
1418
1418
}
1419
1419
1420
1420
run ().catch (console .error );
0 commit comments