doc: "finish" event is on the writable stream
authorGabriel Farrell <g@grrawr.com>
Wed, 11 Dec 2013 15:14:10 +0000 (10:14 -0500)
committerTimothy J Fontaine <tjfontaine@gmail.com>
Thu, 12 Dec 2013 04:29:17 +0000 (20:29 -0800)
doc/api/stream.markdown

index 5ea3e3d..7b52263 100644 (file)
@@ -537,7 +537,7 @@ for (var i = 0; i < 100; i ++) {
   writer.write('hello, #' + i + '!\n');
 }
 writer.end('this is the end\n');
-write.on('finish', function() {
+writer.on('finish', function() {
   console.error('all writes are now complete.');
 });
 ```