Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

doc: several additional bundled doc improvements #25592

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/api/buffer.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Creating a typed array from a `Buffer` works with the following caveats:

2. The buffer's memory is interpreted as an array, not a byte array. That is,
`new Uint32Array(new Buffer([1,2,3,4]))` creates a 4-element `Uint32Array`
with elements `[1,2,3,4]`, not an `Uint32Array` with a single element
with elements `[1,2,3,4]`, not a `Uint32Array` with a single element
`[0x1020304]` or `[0x4030201]`.

NOTE: Node.js v0.8 simply retained a reference to the buffer in `array.buffer`
Expand Down
2 changes: 1 addition & 1 deletion doc/api/child_process.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ Here is an example of sending a server:
child.send('server', server);
});

And the child would the receive the server object as:
And the child would then receive the server object as:

process.on('message', function(m, server) {
if (m === 'server') {
Expand Down
2 changes: 1 addition & 1 deletion doc/api/cluster.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ It is not emitted in the worker.

### Event: 'disconnect'

Similar to the `cluster.on('disconnect')` event, but specfic to this worker.
Similar to the `cluster.on('disconnect')` event, but specific to this worker.

cluster.fork().on('disconnect', function() {
// Worker has disconnected
Expand Down
2 changes: 1 addition & 1 deletion doc/api/crypto.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ Example (obtaining a shared secret):

## crypto.createECDH(curve_name)

Creates a Elliptic Curve (EC) Diffie-Hellman key exchange object using a
Creates an Elliptic Curve (EC) Diffie-Hellman key exchange object using a
predefined curve specified by `curve_name` string.

## Class: ECDH
Expand Down
4 changes: 2 additions & 2 deletions doc/api/dns.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ See [supported `getaddrinfo` flags](#dns_supported_getaddrinfo_flags) below for
more information on supported flags.

The callback has arguments `(err, address, family)`. The `address` argument
is a string representation of a IP v4 or v6 address. The `family` argument
is a string representation of an IP v4 or v6 address. The `family` argument
is either the integer 4 or 6 and denotes the family of `address` (not
necessarily the value initially passed to `lookup`).

Expand Down Expand Up @@ -155,7 +155,7 @@ attribute (e.g. `[{'priority': 10, 'exchange': 'mx.example.com'},...]`).
## dns.resolveTxt(hostname, callback)

The same as `dns.resolve()`, but only for text queries (`TXT` records).
`addresses` is an 2-d array of the text records available for `hostname` (e.g.,
`addresses` is a 2-d array of the text records available for `hostname` (e.g.,
`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
one record. Depending on the use case, the could be either joined together or
treated separately.
Expand Down
4 changes: 4 additions & 0 deletions doc/api/fs.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,10 @@ on Unix systems, it never was.

Returns a new ReadStream object (See `Readable Stream`).

Be aware that, unlike the default value set for `highWaterMark` on a
readable stream (16kB), the stream returned by this method has a
default value of 64kB for the same parameter.

`options` is an object with the following defaults:

{ flags: 'r',
Expand Down
1 change: 1 addition & 0 deletions doc/api/http.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ automatically parsed with [url.parse()][].

Options:

- `protocol`: Protocol to use. Defaults to `'http:'`.
- `host`: A domain name or IP address of the server to issue the request to.
Defaults to `'localhost'`.
- `hostname`: To support `url.parse()` `hostname` is preferred over `host`
Expand Down
14 changes: 7 additions & 7 deletions doc/api/net.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Common options are:
a FIN packet when the other end of the socket sends a FIN packet.
Defaults to `false`. See ['end'][] event for more information.

The `connectListener` parameter will be added as an listener for the
The `connectListener` parameter will be added as a listener for the
['connect'][] event.

Here is an example of a client of echo server as described previously:
Expand Down Expand Up @@ -119,7 +119,7 @@ changed to

Creates a TCP connection to `port` on `host`. If `host` is omitted,
`'localhost'` will be assumed.
The `connectListener` parameter will be added as an listener for the
The `connectListener` parameter will be added as a listener for the
['connect'][] event.

Is a factory method which returns a new ['net.Socket'](#net_class_net_socket).
Expand All @@ -128,7 +128,7 @@ Is a factory method which returns a new ['net.Socket'](#net_class_net_socket).
## net.createConnection(path[, connectListener])

Creates unix socket connection to `path`.
The `connectListener` parameter will be added as an listener for the
The `connectListener` parameter will be added as a listener for the
['connect'][] event.

A factory method which returns a new ['net.Socket'](#net_class_net_socket).
Expand All @@ -150,7 +150,7 @@ parameter is 511 (not 512).

This function is asynchronous. When the server has been bound,
['listening'][] event will be emitted. The last parameter `callback`
will be added as an listener for the ['listening'][] event.
will be added as a listener for the ['listening'][] event.

One issue some users run into is getting `EADDRINUSE` errors. This means that
another server is already running on the requested port. One way of handling this
Expand Down Expand Up @@ -178,7 +178,7 @@ Start a local socket server listening for connections on the given `path`.

This function is asynchronous. When the server has been bound,
['listening'][] event will be emitted. The last parameter `callback`
will be added as an listener for the ['listening'][] event.
will be added as a listener for the ['listening'][] event.

On UNIX, the local domain is usually known as the UNIX domain. The path is a
filesystem path name. It is subject to the same naming conventions and
Expand Down Expand Up @@ -212,7 +212,7 @@ Listening on a file descriptor is not supported on Windows.

This function is asynchronous. When the server has been bound,
['listening'][] event will be emitted.
the last parameter `callback` will be added as an listener for the
the last parameter `callback` will be added as a listener for the
['listening'][] event.

### server.listen(options[, callback])
Expand Down Expand Up @@ -374,7 +374,7 @@ This function is asynchronous. When the ['connect'][] event is emitted the
socket is established. If there is a problem connecting, the `'connect'` event
will not be emitted, the `'error'` event will be emitted with the exception.

The `connectListener` parameter will be added as an listener for the
The `connectListener` parameter will be added as a listener for the
['connect'][] event.


Expand Down
4 changes: 3 additions & 1 deletion doc/api/stream.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ returns it. If there is no data available, then it will return
`null`.

If you pass in a `size` argument, then it will return that many
bytes. If `size` bytes are not available, then it will return `null`.
bytes. If `size` bytes are not available, then it will return `null`,
unless we've ended, in which case it will return the data remaining
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of "we've" maybe this should say "the stream".

in the buffer.

If you do not specify a `size` argument, then it will return all the
data in the internal buffer.
Expand Down
4 changes: 2 additions & 2 deletions lib/_http_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ function parserOnIncomingClient(res, shouldKeepAlive) {
var req = socket._httpMessage;


// propogate "domain" setting...
// propagate "domain" setting...
if (req.domain && !res.domain) {
debug('setting "res.domain"');
res.domain = req.domain;
Expand Down Expand Up @@ -476,7 +476,7 @@ function tickOnSocket(req, socket) {
socket.parser = parser;
socket._httpMessage = req;

// Setup "drain" propogation.
// Setup "drain" propagation.
httpSocketSetup(socket);

// Propagate headers limit from request object to parser
Expand Down
4 changes: 2 additions & 2 deletions lib/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ Url.prototype.resolveObject = function(relative) {
if (psychotic) {
result.hostname = result.host = srcPath.shift();
//occationaly the auth can get stuck only in host
//this especialy happens in cases like
//this especially happens in cases like
//url.resolveObject('mailto:local1@domain1', 'local2@domain2')
var authInHost = result.host && result.host.indexOf('@') > 0 ?
result.host.split('@') : false;
Expand Down Expand Up @@ -684,7 +684,7 @@ Url.prototype.resolveObject = function(relative) {
result.hostname = result.host = isAbsolute ? '' :
srcPath.length ? srcPath.shift() : '';
//occationaly the auth can get stuck only in host
//this especialy happens in cases like
//this especially happens in cases like
//url.resolveObject('mailto:local1@domain1', 'local2@domain2')
var authInHost = result.host && result.host.indexOf('@') > 0 ?
result.host.split('@') : false;
Expand Down
2 changes: 1 addition & 1 deletion src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2070,7 +2070,7 @@ static void OnFatalError(const char* location, const char* message) {

NO_RETURN void FatalError(const char* location, const char* message) {
OnFatalError(location, message);
// to supress compiler warning
// to suppress compiler warning
abort();
}

Expand Down
2 changes: 1 addition & 1 deletion src/node_object_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class ObjectWrap {
* attached to detached state it will be freed. Be careful not to access
* the object after making this call as it might be gone!
* (A "weak reference" means an object that only has a
* persistant handle.)
* persistent handle.)
*
* DO NOT CALL THIS FROM DESTRUCTOR
*/
Expand Down