Roman Klauke
4c132fe61e
doc: make references clickable
...
The child_process docs contained some links, but some links were
somehow "broken". `make doc` couldn't translate them and left `[]`
in the compiled HTML.
PR-URL: https://github.com/nodejs/node/pull/4654
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-01-13 09:08:39 -08:00
Ryan Sobol
d139704ff7
doc: improve child_process.execFile() code example
...
PR-URL: https://github.com/nodejs/node/pull/4504
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2016-01-13 11:24:33 -05:00
Daniel Sellers
d755432fa9
http: improves expect header handling
...
Now returns a 417 error status or allows for an event listener on
the `checkExpectation` event. Before we were ignoring requests that
had misspelled `100-continue` values for expect headers.
This is a quick port of the work done here:
https://github.com/nodejs/node-v0.x-archive/pull/7132 by alFReD-NSH
with surrounding discussion here:
https://github.com/nodejs/node-v0.x-archive/issues/4651
Also updates all the instances of the deprecated
EventEmitter.listenerCount to the current self.listenerCount. Most
of these were in the new code ported over but there was another
legacy instance.
Refs: #2403
PR-URL: https://github.com/nodejs/node/pull/4501
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-01-13 08:05:12 -08:00
zoubin
eeb6fdcd0f
doc: add docs for more stream options
...
PR-URL: https://github.com/nodejs/node/pull/4639
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chris Dickinson <chris@neversaw.us >
2016-01-12 12:49:42 -08:00
Saquib
6039a7c1b5
fs: add autoClose option to fs.createWriteStream
...
Add support to fs.createWriteStream and fs.createWriteStream for an autoClose
option that behaves similarly to the autoClose option supported by
fs.createReadStream and fs.ReadStream.
When an instance of fs.createWriteStream created with autoClose === false finishes,
it is not destroyed. Its underlying fd is not closed and it is the
responsibility of the user to close it.
PR-URL: https://github.com/nodejs/node/pull/3679
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-01-11 11:03:52 -08:00
Robert Jefe Lindstaedt
5a53cba784
doc: adds usage of readline line-by-line parsing
...
In order to make developers aware of node-core built-in
functionality, which might replace module APIs, we should
add an example of readline`s interface usage.
SEO will eventually aid this goal, since it is well searched
on Q&A sites.
PR-URL: https://github.com/nodejs/node/pull/4609
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: James M Snell <jasnell@gmail.com >>
2016-01-11 19:53:05 +01:00
Richard Sun
a2e77cedef
doc: remove "above" and "below" references
...
The docs were recently refactored, and some "above" and "below"
references were no longer accurate. This commit removes many
such references, and replaces others with links.
PR-URL: https://github.com/nodejs/node/pull/4499
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-01-11 13:06:00 -05:00
Wyatt Preul
d7c5110a79
doc: stronger suggestion for userland assert
...
Fixes: https://github.com/nodejs/node/issues/4532
PR-URL: https://github.com/nodejs/node/pull/4535
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-01-11 10:17:31 -05:00
Sequoia McDowell
b40aca1cd5
doc: label http.IncomingMessage as a Class
...
`Server`, `ServerResponse` etc. were marked as classes, this one class
was overlooked.
PR-URL: https://github.com/nodejs/node/pull/4589
Fixes: https://github.com/nodejs/node/issues/4576
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-01-11 07:17:18 +01:00
Sequoia McDowell
9456f5012d
doc: document http's server.listen return value
...
The server method returns `self` in order to allow chaining.
PR-URL: https://github.com/nodejs/node/pull/4590
Fixes: https://github.com/nodejs/node/issues/4571
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-01-11 07:10:01 +01:00
Fedor Indutny
5f76b24e5e
http: overridable clientError
...
Make default `clientError` behavior (close socket immediately)
overridable. With this APIs it is possible to write a custom error
handler, and to send, for example, a 400 HTTP response.
http.createServer(...).on('clientError', function(err, socket) {
socket.end('HTTP/1.1 400 Bad Request\r\n\r\n');
socket.destroy();
});
Fix : #4543
PR-URL: https://github.com/nodejs/node/pull/4557
Reviewed-By: Brian White <mscdex@mscdex.net >
2016-01-07 03:39:15 -05:00
Fedor Indutny
1ab6b21360
tls: rename clientError to tlsClientError
...
`clientError` will have `http.Server`-specific behavior, and we don't
want to shadow it in `tls.Server`.
PR-URL: https://github.com/nodejs/node/pull/4557
Reviewed-By: Brian White <mscdex@mscdex.net >
2016-01-07 03:38:56 -05:00
Brian White
e51bbfd487
doc: add missing backtick for readline
...
PR-URL: https://github.com/nodejs/node/pull/4549
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-01-06 00:04:37 -05:00
James M Snell
cc82e5e3d9
doc: improvements to crypto.markdown copy
...
General improvements to crypto.markdown including new and
revised examples.
PR-URL: https://github.com/nodejs/node/pull/4435
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
2016-01-06 09:51:56 +09:00
Shigeki Ohtsu
64e294adb2
doc: fix heading level error in Buffer doc
...
tools/doc/html.js in make doc throws an error in checking a heading
level in the markdown file.
PR-URL: https://github.com/nodejs/node/pull/4537
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-01-05 10:13:21 -08:00
Dave
a497bb5d09
doc: close backtick in process.title description
...
PR-URL: https://github.com/nodejs/node/pull/4534
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2016-01-05 10:27:17 -05:00
Richard Sun
5194a1e3ce
doc: fix numbering in stream.markdown
...
PR-URL: https://github.com/nodejs/node/pull/4538
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-01-05 10:24:15 -05:00
James M Snell
7e985d81cc
doc: improvements to dgram.markdown copy
...
General improvements to dgram.markdown copy
PR-URL: https://github.com/nodejs/node/pull/4437
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com >
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com >
2016-01-04 08:42:06 -08:00
James M Snell
bbb4a2a517
doc: improvements to errors.markdown copy
...
General improvements to errors.markdown including
improved/revised examples
PR-URL: https://github.com/nodejs/node/pull/4454
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com >
2016-01-04 08:40:09 -08:00
Anna Henningsen
ac153bd2a6
timers: fail early when callback is not a function
...
`setTimeout()`, `setInterval()` and `setIntermediate` currently
throw errors when receiving non-function objects as their first
argument, but only do so when trying to execute the callback,
i.e. after the waited time has passed. This may complicate
debugging when a lot of calls to `setTimeout()`/etc. are involved,
so failing as early as possible seems like a good idea.
`setTimeout()` historically ignored an falsy first
argument, while the other functions do not and throw instead.
This patch changes this behaviour to make all three match and
adds remarks in the corresponding documentation.
PR-URL: https://github.com/nodejs/node/pull/4362
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
2016-01-04 14:56:19 +11:00
Ryan Sobol
4e8a005662
doc: mention that http.Server inherits from net.Server
...
PR-URL: https://github.com/nodejs/node/pull/4455
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-12-30 12:06:25 -08:00
Ben Ripkens
c280596944
doc: explain ClientRequest#setTimeout time unit
...
State a time unit for the timeout parameter in ClientRequest#setTimeout
PR-URL: https://github.com/nodejs/node/pull/4458
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-12-30 12:04:03 -08:00
iamchenxin
1de6e4f9ab
doc: add anchors for _transform _flush _writev in stream.markdown
...
PR-URL: https://github.com/nodejs/node/pull/4448
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-12-30 11:49:47 -08:00
James M Snell
1a004f1187
doc: improvements to debugger.markdown copy
...
General improvements to debugger.markdown
PR-URL: https://github.com/nodejs/node/pull/4436
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-12-30 11:21:13 -08:00
James M Snell
a0130e16e5
doc: improvements to events.markdown copy
...
General improvements to events.markdown copy including a
bit of restructuring and improved examples
PR-URL: https://github.com/nodejs/node/pull/4468
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2015-12-30 10:50:52 -08:00
James M Snell
7ee1685d74
doc: improvements to dns.markdown copy
...
General improvements to dns.markdown copy and examples
PR-URL: https://github.com/nodejs/node/pull/4449
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2015-12-30 10:48:10 -08:00
James M Snell
e4c835e1cb
doc: improvements to console.markdown copy
...
Several improvements including a few new examples
PR-URL: https://github.com/nodejs/node/pull/4428
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2015-12-30 10:42:29 -08:00
James M Snell
7d5c1b5b1a
doc: improve child_process.markdown copy
...
General improvements to child_process.markdown
PR-URL: https://github.com/nodejs/node/pull/4383
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-12-30 10:29:48 -08:00
Rich Trott
f241d6685b
doc: copyedit setTimeout() documentation
...
Copyedit the documentation for setTimeout() and enforce wrapping at 80
characters in the markdown file for nearby text.
PR-URL: https://github.com/nodejs/node/pull/4434
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com >
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com >
2015-12-29 19:13:13 -08:00
Rich Trott
312b4d6371
doc: fix formatting in process.markdown
...
All the other properties get an h2/## but process.connected gets an
h3/### for no discernible reason. Change it to h2/## like the others.
PR-URL: https://github.com/nodejs/node/pull/4433
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
2015-12-29 19:06:23 -08:00
James M Snell
3e648eb2ca
doc: improve assert.markdown copy
...
General improvements to assert.markdown copy including
new and improved examples
PR-URL: https://github.com/nodejs/node/pull/4360
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-12-28 12:14:49 -08:00
Adri Van Houdt
2fd3d8aee6
doc: improve grammar in tls docs
...
Fix : #4246
PR-URL: https://github.com/nodejs/node/pull/4315
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Fedor Indutny <fedor@indutny.com >
2015-12-23 17:17:51 -08:00
James M Snell
67b109a4b4
doc: improvements to buffer.markdown copy
...
General improvements to buffer.markdown including new examples,
a few fixes to existing examples, consistent formatting and
others
PR-URL: https://github.com/nodejs/node/pull/4370
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-12-23 13:47:54 -08:00
James M Snell
d5863bc0f4
doc: improve addons.markdown copy
...
General improvements to the documentation in addons.markdown.
PR-URL: https://github.com/nodejs/node/pull/4320
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2015-12-23 12:19:42 -08:00
James M Snell
9b21119e17
doc: fix, modernize examples in docs
...
* Use single quotes consistently
* Modernize examples to use template strings and arrow funcs
* Fix a few typos
* Example edits for consistency
PR-URL: https://github.com/nodejs/node/pull/4282
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-12-17 08:07:29 -08:00
chrisjohn404
f2bddc14f6
doc: Typo in buffer.markdown referencing buf.write()
...
The buffer's write function is documented below the
buf.toString function and all of the docs reference
"buf" instead of "buffer".
PR-URL: https://github.com/nodejs/node/pull/4324
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-12-17 07:55:09 -08:00
Nicholas Young
4637168f81
doc: fix link in addons.markdown
...
Update link from github.com/rvagg to github.com/nodejs
PR-URL: https://github.com/nodejs/node/pull/4331
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-12-17 07:48:33 -08:00
Jackson Tian
a8854e5b59
doc: document the cache parameter for fs.realpathSync
...
PR-URL: https://github.com/nodejs/node/pull/4285
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-12-16 08:41:45 -08:00
Jan Schär
9e1b7aa874
doc: document backlog for server.listen() variants
...
The backlog parameter is supported by all variations of
net.Server.listen(), but wasn't consistently documented. This
commit brings the documentation into a more consistent state.
Refs: https://github.com/nodejs/node/pull/4056
PR-URL: https://github.com/nodejs/node/pull/4025
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
2015-12-16 10:58:51 -05:00
Bryan English
7a518788e9
doc, test: symbols as event names
...
* Document that Symbol can used as event names.
* Add test for using Symbol as event names
PR-URL: https://github.com/nodejs/node/pull/4151
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-12-14 15:31:32 -08:00
Lenny Markus
9538fd02e5
doc: clarify error events in HTTP module documentation
...
Make it clear that error with throw if error listener is
not registered.
PR-URL: https://github.com/nodejs/node/pull/4275
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-12-14 15:11:18 -08:00
Hideki Yamamura
c6efd535e4
doc: fix improper http.get sample code
...
Refs: https://github.com/nodejs/node-v0.x-archive/pull/25471
Refs: https://github.com/nodejs/node-v0.x-archive/issues/8443
PR-URL: https://github.com/nodejs/node/pull/4263
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-12-14 14:54:22 -08:00
Arthur Gautier
671347cf13
doc: fixup socket.remoteAddress
...
remoteAddress may be undefined under certain conditions
Signed-off-by: Arthur Gautier <baloo@gandi.net >
PR-URL: https://github.com/nodejs/node/pull/4198
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
2015-12-14 17:25:36 +11:00
Rich Trott
f050cab3d8
doc: copyedit console doc
...
PR-URL: https://github.com/nodejs/node/pull/4225
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-12-11 21:19:57 -08:00
Fedor Indutny
c5b4f6bc99
tls: introduce secureContext for tls.connect
...
Add `secureContext` option to `tls.connect`. It is useful for caching
client certificates, key, and CA certificates.
PR-URL: https://github.com/nodejs/node/pull/4246
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-12-11 19:53:30 -05:00
janriemer
1a21a5368b
doc: move description of 'equals' method to right place
...
the description of buffer.equals(otherBuffer) was at the wrong
place; move it underneath the method signature
PR-URL: https://github.com/nodejs/node/pull/4227
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-12-11 10:40:56 -08:00
Tom Gallacher
9a9c5259bf
doc: Fixing broken links to the v8 wiki
...
PR-URL: https://github.com/nodejs/node/pull/4241
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com >
2015-12-11 10:24:46 -08:00
Alexander Martin
67e181986a
buffer: add includes() for parity with TypedArray
...
Add Buffer#includes() by wrapping an indexOf and performing a strict
equals check to -1.
The includes method takes the search value, byteOffset, and encoding as
arguments.
The test is a modified version of the indexOf test.
Fixes: https://github.com/nodejs/node/issues/3552
PR-URL: https://github.com/nodejs/node/pull/3567
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-12-10 13:41:40 -07:00
Rich Trott
37ed05b8c1
doc: copyedit child_process doc
...
PR-URL: https://github.com/nodejs/node/pull/4188
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com >
2015-12-09 16:56:26 -08:00
Rich Trott
e47ae5808b
doc: copyedit buffer doc
...
PR-URL: https://github.com/nodejs/node/pull/4187
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2015-12-09 16:49:04 -08:00