From 66a0af257e62f398446bc676aaf520760d2e210b Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 09:46:07 -0700 Subject: [PATCH 01/20] doc: Clarify the module.parent is set once Per: https://github.com/jorrit/node/commit/54a7f79a4a2ecb9c6f235a03287fe2992f19f0bb Fixes: https://github.com/joyent/node/issues/6149 Originally submitted by @jorrit --- doc/api/modules.markdown | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/api/modules.markdown b/doc/api/modules.markdown index 3bd42be752a815..0f2a20dd051ca8 100644 --- a/doc/api/modules.markdown +++ b/doc/api/modules.markdown @@ -357,8 +357,7 @@ loading. * {Module Object} -The module that required this one. - +The module that first required this one. ### module.children From fcbd2bc3fdfeb8de177e86bed848978e524fe412 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 09:48:49 -0700 Subject: [PATCH 02/20] doc: correct grammar in cluster.markdown per: https://github.com/joyent/node/pull/14352 originally submitted by @AlexKVal --- doc/api/cluster.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/cluster.markdown b/doc/api/cluster.markdown index 06abdccc0d3aac..13ac19ec2eba92 100644 --- a/doc/api/cluster.markdown +++ b/doc/api/cluster.markdown @@ -24,7 +24,7 @@ all share server ports. }); } else { // Workers can share any TCP connection - // In this case its a HTTP server + // In this case it is an HTTP server http.createServer(function(req, res) { res.writeHead(200); res.end("hello world\n"); From 81e4274136eedaac69fbe8810c2b76cfda607914 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 10:00:54 -0700 Subject: [PATCH 03/20] doc: code style cleanups in repl.markdown per: https://github.com/joyent/node/pull/8778 originally submitted by @reggi --- doc/api/repl.markdown | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/doc/api/repl.markdown b/doc/api/repl.markdown index 6675f28a0addd4..5783b6a931ecbf 100644 --- a/doc/api/repl.markdown +++ b/doc/api/repl.markdown @@ -117,13 +117,12 @@ will share the same global object but will have unique I/O. Here is an example that starts a REPL on stdin, a Unix socket, and a TCP socket: - var net = require("net"), - repl = require("repl"); - - connections = 0; + var net = require('net'), + repl = require('repl'), + connections = 0; repl.start({ - prompt: "Node.js via stdin> ", + prompt: 'Node.js via stdin> ', input: process.stdin, output: process.stdout }); @@ -131,18 +130,18 @@ Here is an example that starts a REPL on stdin, a Unix socket, and a TCP socket: net.createServer(function (socket) { connections += 1; repl.start({ - prompt: "Node.js via Unix socket> ", + prompt: 'Node.js via Unix socket> ', input: socket, output: socket }).on('exit', function() { socket.end(); }) - }).listen("/tmp/node-repl-sock"); + }).listen('/tmp/node-repl-sock'); net.createServer(function (socket) { connections += 1; repl.start({ - prompt: "Node.js via TCP socket> ", + prompt: 'Node.js via TCP socket> ', input: socket, output: socket }).on('exit', function() { @@ -191,7 +190,7 @@ be emitted. Example of listening for `reset`: // Extend the initial repl context. - r = repl.start({ options ... }); + var r = repl.start({ options ... }); someExtension.extend(r.context); // When a new context is created extend it as well. @@ -213,7 +212,7 @@ accessing `fs` will `require()` the `fs` module as `global.fs`. The special variable `_` (underscore) contains the result of the last expression. - > [ "a", "b", "c" ] + > [ 'a', 'b', 'c' ] [ 'a', 'b', 'c' ] > _.length 3 @@ -225,10 +224,10 @@ a variable to the REPL explicitly by assigning it to the `context` object associated with each `REPLServer`. For example: // repl_test.js - var repl = require("repl"), - msg = "message"; + var repl = require('repl'), + msg = 'message'; - repl.start("> ").context.m = msg; + repl.start('> ').context.m = msg; Things in the `context` object appear as local within the REPL: From 380329119b3d67d39e2305574486f41c7cba6154 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 10:09:30 -0700 Subject: [PATCH 04/20] doc: small clarifications to modules.markdown per: https://github.com/joyent/node/pull/8708 A modified version of the original PR submitted by @builtbylane. --- doc/api/modules.markdown | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/doc/api/modules.markdown b/doc/api/modules.markdown index 0f2a20dd051ca8..6d0466c719b9b5 100644 --- a/doc/api/modules.markdown +++ b/doc/api/modules.markdown @@ -120,7 +120,12 @@ plan accordingly. Node.js has several modules compiled into the binary. These modules are described in greater detail elsewhere in this documentation. +<<<<<<< HEAD The core modules are defined in Node.js's source in the `lib/` folder. +======= +The core modules are defined within io.js's source and are located in the +`lib/` folder. +>>>>>>> doc: small clarifications to modules.markdown Core modules are always preferentially loaded if their identifier is passed to `require()`. For instance, `require('http')` will always @@ -130,23 +135,29 @@ return the built in HTTP module, even if there is a file by that name. +<<<<<<< HEAD If the exact filename is not found, then Node.js will attempt to load the required filename with the added extension of `.js`, `.json`, and then `.node`. +======= +If the exact filename is not found, then io.js will attempt to load the +required filename with the added extensions: `.js`, `.json`, and finally +`.node`. +>>>>>>> doc: small clarifications to modules.markdown `.js` files are interpreted as JavaScript text files, and `.json` files are parsed as JSON text files. `.node` files are interpreted as compiled addon modules loaded with `dlopen`. -A module prefixed with `'/'` is an absolute path to the file. For +A required module prefixed with `'/'` is an absolute path to the file. For example, `require('/home/marco/foo.js')` will load the file at `/home/marco/foo.js`. -A module prefixed with `'./'` is relative to the file calling `require()`. -That is, `circle.js` must be in the same directory as `foo.js` for +A required module prefixed with `'./'` is relative to the file calling +`require()`. That is, `circle.js` must be in the same directory as `foo.js` for `require('./circle')` to find it. -Without a leading '/', './', or '../' to indicate a file, the module is either a -core module or is loaded from a `node_modules` folder. +Without a leading '/', './', or '../' to indicate a file, the module must +either be a core module or is loaded from a `node_modules` folder. If the given path does not exist, `require()` will throw an Error with its `code` property set to `'MODULE_NOT_FOUND'`. @@ -357,7 +368,7 @@ loading. * {Module Object} -The module that first required this one. +The module that first required this one. ### module.children From 3d5056faa7c98e1d82e9744f2769b98240ac0a03 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 10:25:10 -0700 Subject: [PATCH 05/20] doc: update path.extname documentation per: https://github.com/joyent/node/pull/8509 originally submitted by @thauburger Adding an additional example to path.extname documentation to demonstrate the case where the first character of the last path component is '.'. This case is interesting, as something like path.extname('.txt') returns an empty string. In this case, .txt can be used as a valid file name (while arguably maintaining an extension). I agree with Node's behavior in this case, but I think the added example provides additional clarity for the developer. --- doc/api/path.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/path.markdown b/doc/api/path.markdown index 877491255c7aef..7a06ec68f2df1d 100644 --- a/doc/api/path.markdown +++ b/doc/api/path.markdown @@ -183,6 +183,10 @@ an empty string. Examples: // returns '' + path.extname('.index') + // returns + '' + ## path.sep The platform-specific file separator. `'\\'` or `'/'`. From a90e5fe26cfe9b67431dcb49c23d29bfc23ca8c2 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 10:39:20 -0700 Subject: [PATCH 06/20] doc: improve working in stream.markdown per: https://github.com/joyent/node/pull/8430 originally submitted by @mscdex --- doc/api/stream.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index e30f4c88ee76ea..d32a25e1f1cb06 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -1215,19 +1215,19 @@ as a result of this chunk. Call the callback function only when the current chunk is completely consumed. Note that there may or may not be output as a result of any -particular input chunk. If you supply output as the second argument to the -callback, it will be passed to push method, in other words the following are +particular input chunk. If you supply a second argument to the callback +it will be passed to the push method. In other words the following are equivalent: ```javascript transform.prototype._transform = function (data, encoding, callback) { this.push(data); callback(); -} +}; transform.prototype._transform = function (data, encoding, callback) { callback(null, data); -} +}; ``` This method is prefixed with an underscore because it is internal to From 0173b90ae6ab68dd883a719a1aae9c5919678603 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 10:46:43 -0700 Subject: [PATCH 07/20] doc: clarification on the 'close' event per: https://github.com/joyent/node/pull/8209 originally submitted by @jeromew --- doc/api/stream.markdown | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index d32a25e1f1cb06..2022ef2f71d9ab 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -230,8 +230,11 @@ readable.on('end', function() { #### Event: 'close' -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. +Emitted when the stream and any of its underlying resources (a file +descriptor, for example) have been closed, no more events will be +emitted, and no further computation will occur. + +Not all streams will emit the 'close' event. #### Event: 'error' From e37f1c82f2ee272aff8569e9a5fe34355bb8b186 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 10:59:07 -0700 Subject: [PATCH 08/20] doc: update description of fs.exists in fs.markdown per: https://github.com/joyent/node/pull/7944 originally submitted by @oconnore Minor update to the description in `fs.exists()` --- doc/api/fs.markdown | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index c0f72c59c64101..ac40eeb014b235 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -680,15 +680,11 @@ Then call the `callback` argument with either true or false. Example: console.log(exists ? "it's there" : 'no passwd!'); }); -`fs.exists()` is an anachronism and exists only for historical reasons. -There should almost never be a reason to use it in your own code. - -In particular, checking if a file exists before opening it is an anti-pattern -that leaves you vulnerable to race conditions: another process may remove the -file between the calls to `fs.exists()` and `fs.open()`. Just open the file -and handle the error when it's not there. - - +`fs.exists()` should not be used to check if a file exists before calling +`fs.open()`. Doing so introduces a race condition since other processes may +change the file's state between the two calls. Instead, user code should +call `fs.open()` directly and handle the error raised if the file is +non-existent. ## fs.existsSync(path) From 55c41df27969a0a3a66e1ce47a6d26efaa3addde Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 11:07:13 -0700 Subject: [PATCH 09/20] doc: fixed typo in net.markdown (missing comma) per: https://github.com/joyent/node/pull/7930 originally submitted by @pbrewczynski --- doc/api/net.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/net.markdown b/doc/api/net.markdown index aa31ccb59d1690..e7858dd6586af2 100644 --- a/doc/api/net.markdown +++ b/doc/api/net.markdown @@ -334,7 +334,7 @@ Construct a new socket object. `options` is an object with the following defaults: - { fd: null + { fd: null, allowHalfOpen: false, readable: false, writable: false From 87bdb0a7ece5ba56965454b03bbb694b980976b1 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 11:36:39 -0700 Subject: [PATCH 10/20] doc: small typo in domain.markdown per: https://github.com/joyent/node/pull/7715 originally submitted by @tonylukasavage --- doc/api/domain.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/domain.markdown b/doc/api/domain.markdown index f2b5d3a55072f5..c62b8555f035c4 100644 --- a/doc/api/domain.markdown +++ b/doc/api/domain.markdown @@ -32,7 +32,7 @@ process. Of course, in a normal web server, you might have many connections open, and it is not reasonable to abruptly shut those down because an error was triggered by someone else. -The better approach is send an error response to the request that +The better approach is to send an error response to the request that triggered the error, while letting the others finish in their normal time, and stop listening for new requests in that worker. From 1db5495d5f27ce7050cd1e7ed27296d6182b9b6d Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 11:43:23 -0700 Subject: [PATCH 11/20] doc: update parameter name in net.markdown per: https://github.com/joyent/node/pull/7112 originally submitted by @Peekmo --- doc/api/net.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/net.markdown b/doc/api/net.markdown index e7858dd6586af2..f2be29a6b0d2a4 100644 --- a/doc/api/net.markdown +++ b/doc/api/net.markdown @@ -57,8 +57,8 @@ Use `nc` to connect to a UNIX domain socket server: nc -U /tmp/echo.sock -## net.connect(options[, connectionListener]) -## net.createConnection(options[, connectionListener]) +## net.connect(options[, connectListener]) +## net.createConnection(options[, connectListener]) A factory function, which returns a new ['net.Socket'](#net_class_net_socket) and automatically connects with the supplied `options`. From 8e44a547b84f06478d98d857f395da51d7551816 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 12:56:26 -0700 Subject: [PATCH 12/20] doc: fix minor types and grammar in fs docs per: https://github.com/joyent/node/pull/7431 Originally submitted by @linclark --- doc/api/fs.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index ac40eeb014b235..9f885422c5aa81 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -8,7 +8,7 @@ File I/O is provided by simple wrappers around standard POSIX functions. To use this module do `require('fs')`. All the methods have asynchronous and synchronous forms. -The asynchronous form always take a completion callback as its last argument. +The asynchronous form always takes a completion callback as its last argument. The arguments passed to the completion callback depend on the method, but the first argument is always reserved for an exception. If the operation was completed successfully, then the first argument will be `null` or `undefined`. @@ -59,8 +59,8 @@ In busy processes, the programmer is _strongly encouraged_ to use the asynchronous versions of these calls. The synchronous versions will block the entire process until they complete--halting all connections. -Relative path to filename can be used, remember however that this path will be -relative to `process.cwd()`. +The relative path to a filename can be used. Remember, however, that this path +will be relative to `process.cwd()`. Most fs functions let you omit the callback argument. If you do, a default callback is used that rethrows errors. To get a trace to the original call @@ -574,7 +574,7 @@ stat object: These stat objects are instances of `fs.Stat`. -If you want to be notified when the file was modified, not just accessed +If you want to be notified when the file was modified, not just accessed, you need to compare `curr.mtime` and `prev.mtime`. _Note: when an `fs.watchFile` operation results in an `ENOENT` error, it will From bc9cfd6a7606e6a6176f15365d14168ab9367973 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 15:05:24 -0700 Subject: [PATCH 13/20] doc: port is optional for socket.bind() per: https://github.com/joyent/node/pull/25356 originally submitted by @dcousens --- doc/api/dgram.markdown | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/api/dgram.markdown b/doc/api/dgram.markdown index 5d05b1c85b001e..72ea2130581d6b 100644 --- a/doc/api/dgram.markdown +++ b/doc/api/dgram.markdown @@ -158,15 +158,16 @@ a packet might travel, and that generally sending a datagram greater than the (receiver) `MTU` won't work (the packet gets silently dropped, without informing the source that the data did not reach its intended recipient). -### socket.bind(port[, address][, callback]) +### socket.bind([port][, address][, callback]) -* `port` Integer +* `port` Integer, Optional * `address` String, Optional * `callback` Function with no parameters, Optional. Callback when binding is done. For UDP sockets, listen for datagrams on a named `port` and optional -`address`. If `address` is not specified, the OS will try to listen on +`address`. If `port` is not specified, the OS will try to bind to a random +port. If `address` is not specified, the OS will try to listen on all addresses. After binding is done, a "listening" event is emitted and the `callback`(if specified) is called. Specifying both a "listening" event listener and `callback` is not harmful but not very From 60ae5722e40e7d4fe05008a177366ae5e8db1fa6 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 15:12:47 -0700 Subject: [PATCH 14/20] doc: fixed worker.id type per: https://github.com/joyent/node/pull/25459 originally submitted by @sonnyp --- doc/api/cluster.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/cluster.markdown b/doc/api/cluster.markdown index 13ac19ec2eba92..a40e4e75343675 100644 --- a/doc/api/cluster.markdown +++ b/doc/api/cluster.markdown @@ -384,7 +384,7 @@ it can be obtained using `cluster.worker`. ### worker.id -* {String} +* {Number} Each new worker is given its own unique id, this id is stored in the `id`. From a1a09acb0f96a3b2a7a679cdc98110b67c921af1 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 15:23:25 -0700 Subject: [PATCH 15/20] doc: update tense in child_process.markdown per: https://github.com/joyent/node/pull/25826 originally submitted by: @ClimbsRocks --- doc/api/child_process.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index d053d29f093d1b..4748b874dff0f7 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -88,7 +88,7 @@ and the `.connected` property is false. * `message` {Object} a parsed JSON object or primitive value * `sendHandle` {Handle object} a Socket or Server object -Messages send by `.send(message, [sendHandle])` are obtained using the +Messages sent by `.send(message, [sendHandle])` are obtained using the `message` event. ### child.stdin From 9edad0e7f76a4dd393e642bba409e315b405e7d9 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 15:27:17 -0700 Subject: [PATCH 16/20] doc: remove 'dudes' from documentation per: https://github.com/joyent/node/pull/25572#discussion_r33197896 --- doc/api/child_process.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index 4748b874dff0f7..05308068a98e88 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -315,7 +315,7 @@ process. special.send('socket', socket); return; } - // just the usual dudes + // just the usual... normal.send('socket', socket); }); server.listen(1337); From 232a8b71fdcb7ff9f0a2e169fff791d0cbc0c541 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 15:54:28 -0700 Subject: [PATCH 17/20] doc: remove repeated statement in globals.markdown Per: https://github.com/joyent/node/pull/25102 Originally reported by @kuldipem --- doc/api/globals.markdown | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/api/globals.markdown b/doc/api/globals.markdown index ab5a592891292c..082ab3e784c210 100644 --- a/doc/api/globals.markdown +++ b/doc/api/globals.markdown @@ -143,8 +143,6 @@ when to use `module.exports`. See the [module system documentation][] for more information. -See the [module section][] for more information. - ## setTimeout(cb, ms) Run callback `cb` after *at least* `ms` milliseconds. The actual delay depends From 161fe34baf6f595208df4cc560e85323e5d0f2f0 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 16:08:57 -0700 Subject: [PATCH 18/20] doc: minor grammatical update Per: https://github.com/joyent/node/pull/9009 Originally submitted by @peerwit --- doc/api/crypto.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/crypto.markdown b/doc/api/crypto.markdown index bc77020028a41d..e1852ff25252e0 100644 --- a/doc/api/crypto.markdown +++ b/doc/api/crypto.markdown @@ -135,7 +135,7 @@ Returned by `crypto.createHash`. Updates the hash content with the given `data`, the encoding of which is given in `input_encoding` and can be `'utf8'`, `'ascii'` or -`'binary'`. If no encoding is provided and the input is a string an +`'binary'`. If no encoding is provided, and the input is a string, an encoding of `'binary'` is enforced. If `data` is a `Buffer` then `input_encoding` is ignored. From 334d09d3ce5ca84598cbfb2acd859b23a18226b0 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 16:23:00 -0700 Subject: [PATCH 19/20] doc: minor grammatical update in crypto.markdown Per: https://github.com/joyent/node/pull/8878 Originally submitted by @jacksonhoose --- doc/api/crypto.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/crypto.markdown b/doc/api/crypto.markdown index e1852ff25252e0..093b600871e34c 100644 --- a/doc/api/crypto.markdown +++ b/doc/api/crypto.markdown @@ -323,7 +323,7 @@ called. You can disable auto padding if the data has been encrypted without standard block padding to prevent `decipher.final` from checking and -removing it. Can only work if the input data's length is a multiple of +removing it. This will only work if the input data's length is a multiple of the ciphers block size. You must call this before streaming data to `decipher.update`. From 03206cbe6e8c26213a9c88fe5c5e72bb29ebd039 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 21 Aug 2015 19:21:06 -0700 Subject: [PATCH 20/20] doc: minor additional corrections and improvements Per feedback from @thefourtheye: (a) improve word on the description of the `close` event in stream.markdown and (b) remove `[module section]: modules.html` from globals.markdown --- doc/api/globals.markdown | 1 - doc/api/stream.markdown | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/api/globals.markdown b/doc/api/globals.markdown index 082ab3e784c210..2a2140fe532452 100644 --- a/doc/api/globals.markdown +++ b/doc/api/globals.markdown @@ -181,7 +181,6 @@ will not execute. The timer functions are global variables. See the [timers][] section. [buffer section]: buffer.html -[module section]: modules.html [module system documentation]: modules.html [Modules]: modules.html#modules_modules [process object]: process.html#process_process diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index 2022ef2f71d9ab..a55098cd5e3101 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -231,8 +231,8 @@ readable.on('end', function() { #### Event: 'close' Emitted when the stream and any of its underlying resources (a file -descriptor, for example) have been closed, no more events will be -emitted, and no further computation will occur. +descriptor, for example) have been closed. The event indicates that +no more events will be emitted, and no further computation will occur. Not all streams will emit the 'close' event.