Skip to content

Commit 789bbb9

Browse files
bnoordhuiscjihrig
authored andcommitted
doc: update node.js references in api docs
Fixes: #740 PR-URL: #750 Reviewed-By: Colin Ihrig <[email protected]>
1 parent c22e5ac commit 789bbb9

30 files changed

+208
-207
lines changed

doc/api/addons.markdown

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ knowledge of several libraries:
66

77
- V8 JavaScript, a C++ library. Used for interfacing with JavaScript:
88
creating objects, calling functions, etc. Documented mostly in the
9-
`v8.h` header file (`deps/v8/include/v8.h` in the Node source
9+
`v8.h` header file (`deps/v8/include/v8.h` in the io.js source
1010
tree), which is also available
1111
[online](http://izs.me/v8-docs/main.html).
1212

@@ -16,12 +16,12 @@ knowledge of several libraries:
1616
to interface with libuv. That is, if you perform any I/O, libuv will
1717
need to be used.
1818

19-
- Internal Node libraries. Most importantly is the `node::ObjectWrap`
19+
- Internal io.js libraries. Most importantly is the `node::ObjectWrap`
2020
class which you will likely want to derive from.
2121

2222
- Others. Look in `deps/` for what else is available.
2323

24-
Node statically compiles all its dependencies into the executable.
24+
io.js statically compiles all its dependencies into the executable.
2525
When compiling your module, you don't need to worry about linking to
2626
any of these libraries.
2727

@@ -55,7 +55,7 @@ First we create a file `hello.cc`:
5555

5656
NODE_MODULE(addon, init)
5757

58-
Note that all Node addons must export an initialization function:
58+
Note that all io.js addons must export an initialization function:
5959

6060
void Initialize (Handle<Object> exports);
6161
NODE_MODULE(module_name, Initialize)
@@ -90,7 +90,7 @@ command.
9090
Now you have your compiled `.node` bindings file! The compiled bindings end up
9191
in `build/Release/`.
9292

93-
You can now use the binary addon in a Node project `hello.js` by pointing
93+
You can now use the binary addon in an io.js project `hello.js` by pointing
9494
`require` to the recently built `hello.node` module:
9595

9696
// hello.js
@@ -564,7 +564,7 @@ Test it with:
564564
### Passing wrapped objects around
565565

566566
In addition to wrapping and returning C++ objects, you can pass them around
567-
by unwrapping them with Node's `node::ObjectWrap::Unwrap` helper function.
567+
by unwrapping them with io.js's `node::ObjectWrap::Unwrap` helper function.
568568
In the following `addon.cc` we introduce a function `add()` that can take on two
569569
`MyObject` objects:
570570

doc/api/buffer.markdown

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Pure JavaScript is Unicode friendly but not nice to binary data. When
66
dealing with TCP streams or the file system, it's necessary to handle octet
7-
streams. Node has several strategies for manipulating, creating, and
7+
streams. io.js has several strategies for manipulating, creating, and
88
consuming octet streams.
99

1010
Raw data is stored in instances of the `Buffer` class. A `Buffer` is similar
@@ -33,7 +33,7 @@ encoding method. Here are the different string encodings.
3333
* `'binary'` - A way of encoding raw binary data into strings by using only
3434
the first 8 bits of each character. This encoding method is deprecated and
3535
should be avoided in favor of `Buffer` objects where possible. This encoding
36-
will be removed in future versions of Node.
36+
will be removed in future versions of io.js.
3737

3838
* `'hex'` - Encode each byte as two hexadecimal characters.
3939

@@ -295,7 +295,7 @@ so the legal range is between `0x00` and `0xFF` hex or `0` and `255`.
295295

296296
Example: copy an ASCII string into a buffer, one byte at a time:
297297

298-
str = "node.js";
298+
str = "io.js";
299299
buf = new Buffer(str.length);
300300

301301
for (var i = 0; i < str.length ; i++) {
@@ -304,7 +304,7 @@ Example: copy an ASCII string into a buffer, one byte at a time:
304304

305305
console.log(buf);
306306

307-
// node.js
307+
// io.js
308308

309309
### buf.equals(otherBuffer)
310310

doc/api/child_process.markdown

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
Stability: 3 - Stable
44

5-
Node provides a tri-directional `popen(3)` facility through the
5+
io.js provides a tri-directional `popen(3)` facility through the
66
`child_process` module.
77

88
It is possible to stream data through a child's `stdin`, `stdout`, and
99
`stderr` in a fully non-blocking way. (Note that some programs use
10-
line-buffered I/O internally. That doesn't affect node.js but it means
10+
line-buffered I/O internally. That doesn't affect io.js but it means
1111
data you send to the child process may not be immediately consumed.)
1212

1313
To create a child process use `require('child_process').spawn()` or
@@ -61,8 +61,9 @@ of the signal, otherwise `null`.
6161

6262
Note that the child process stdio streams might still be open.
6363

64-
Also, note that node establishes signal handlers for `'SIGINT'` and `'SIGTERM`',
65-
so it will not terminate due to receipt of those signals, it will exit.
64+
Also, note that io.js establishes signal handlers for `'SIGINT'` and
65+
`'SIGTERM`', so it will not terminate due to receipt of those signals,
66+
it will exit.
6667

6768
See `waitpid(2)`.
6869

@@ -248,7 +249,7 @@ instead, see
248249

249250
There is a special case when sending a `{cmd: 'NODE_foo'}` message. All messages
250251
containing a `NODE_` prefix in its `cmd` property will not be emitted in
251-
the `message` event, since they are internal messages used by node core.
252+
the `message` event, since they are internal messages used by io.js core.
252253
Messages containing the prefix are emitted in the `internalMessage` event, you
253254
should by all means avoid using this feature, it is subject to change without notice.
254255

@@ -458,12 +459,12 @@ index corresponds to a fd in the child. The value is one of the following:
458459
between parent and child. A ChildProcess may have at most *one* IPC stdio
459460
file descriptor. Setting this option enables the ChildProcess.send() method.
460461
If the child writes JSON messages to this file descriptor, then this will
461-
trigger ChildProcess.on('message'). If the child is a Node.js program, then
462+
trigger ChildProcess.on('message'). If the child is an io.js program, then
462463
the presence of an IPC channel will enable process.send() and
463464
process.on('message').
464-
3. `'ignore'` - Do not set this file descriptor in the child. Note that Node
465+
3. `'ignore'` - Do not set this file descriptor in the child. Note that io.js
465466
will always open fd 0 - 2 for the processes it spawns. When any of these is
466-
ignored node will open `/dev/null` and attach it to the child's fd.
467+
ignored io.js will open `/dev/null` and attach it to the child's fd.
467468
4. `Stream` object - Share a readable or writable stream that refers to a tty,
468469
file, socket, or a pipe with the child process. The stream's underlying
469470
file descriptor is duplicated in the child process to the fd that
@@ -625,17 +626,17 @@ leaner than `child_process.exec`. It has the same options.
625626
* `gid` {Number} Sets the group identity of the process. (See setgid(2).)
626627
* Return: ChildProcess object
627628

628-
This is a special case of the `spawn()` functionality for spawning Node
629+
This is a special case of the `spawn()` functionality for spawning io.js
629630
processes. In addition to having all the methods in a normal ChildProcess
630631
instance, the returned object has a communication channel built-in. See
631632
`child.send(message, [sendHandle])` for details.
632633

633-
These child Nodes are still whole new instances of V8. Assume at least 30ms
634-
startup and 10mb memory for each new Node. That is, you cannot create many
635-
thousands of them.
634+
These child io.js processes are still whole new instances of V8. Assume at
635+
least 30ms startup and 10mb memory for each new io.js. That is, you cannot
636+
create many thousands of them.
636637

637638
The `execPath` property in the `options` object allows for a process to be
638-
created for the child rather than the current `node` executable. This should be
639+
created for the child rather than the current `iojs` executable. This should be
639640
done with care and by default will talk over the fd represented an
640641
environmental variable `NODE_CHANNEL_FD` on the child process. The input and
641642
output on this fd is expected to be line delimited JSON objects.

doc/api/cluster.markdown

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
Stability: 2 - Unstable
44

5-
A single instance of Node runs in a single thread. To take advantage of
6-
multi-core systems the user will sometimes want to launch a cluster of Node
5+
A single instance of io.js runs in a single thread. To take advantage of
6+
multi-core systems the user will sometimes want to launch a cluster of io.js
77
processes to handle the load.
88

99
The cluster module allows you to easily create child processes that
@@ -31,9 +31,9 @@ all share server ports.
3131
}).listen(8000);
3232
}
3333

34-
Running node will now share port 8000 between the workers:
34+
Running io.js will now share port 8000 between the workers:
3535

36-
% NODE_DEBUG=cluster node server.js
36+
% NODE_DEBUG=cluster iojs server.js
3737
23521,Master Worker 23524 online
3838
23521,Master Worker 23526 online
3939
23521,Master Worker 23523 online
@@ -74,7 +74,7 @@ out of a total of eight.
7474

7575
Because `server.listen()` hands off most of the work to the master
7676
process, there are three cases where the behavior between a normal
77-
node.js process and a cluster worker differs:
77+
io.js process and a cluster worker differs:
7878

7979
1. `server.listen({fd: 7})` Because the message is passed to the master,
8080
file descriptor 7 **in the parent** will be listened on, and the
@@ -91,15 +91,15 @@ node.js process and a cluster worker differs:
9191
want to listen on a unique port, generate a port number based on the
9292
cluster worker ID.
9393

94-
There is no routing logic in Node.js, or in your program, and no shared
94+
There is no routing logic in io.js, or in your program, and no shared
9595
state between the workers. Therefore, it is important to design your
9696
program such that it does not rely too heavily on in-memory data objects
9797
for things like sessions and login.
9898

9999
Because workers are all separate processes, they can be killed or
100100
re-spawned depending on your program's needs, without affecting other
101101
workers. As long as there are some workers still alive, the server will
102-
continue to accept connections. Node does not automatically manage the
102+
continue to accept connections. io.js does not automatically manage the
103103
number of workers for you, however. It is your responsibility to manage
104104
the worker pool for your application's needs.
105105

@@ -121,7 +121,7 @@ values are `"rr"` and `"none"`.
121121
## cluster.settings
122122

123123
* {Object}
124-
* `execArgv` {Array} list of string arguments passed to the node executable.
124+
* `execArgv` {Array} list of string arguments passed to the io.js executable.
125125
(Default=`process.execArgv`)
126126
* `exec` {String} file path to worker file. (Default=`process.argv[1]`)
127127
* `args` {Array} string arguments passed to worker.

doc/api/crypto.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ dictionary with keys:
7777
<http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT>
7878
for details on the format.
7979

80-
If no 'ca' details are given, then node.js will use the default
80+
If no 'ca' details are given, then io.js will use the default
8181
publicly trusted list of CAs as given in
8282
<http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt>.
8383

@@ -733,12 +733,12 @@ as a temporary measure.
733733

734734
## Recent API Changes
735735

736-
The Crypto module was added to Node before there was the concept of a
736+
The Crypto module was added to Node.js before there was the concept of a
737737
unified Stream API, and before there were Buffer objects for handling
738738
binary data.
739739

740740
As such, the streaming classes don't have the typical methods found on
741-
other Node classes, and many methods accepted and returned
741+
other io.js classes, and many methods accepted and returned
742742
Binary-encoded strings by default rather than Buffers. This was
743743
changed to use Buffers by default instead.
744744

doc/api/debugger.markdown

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
V8 comes with an extensive debugger which is accessible out-of-process via a
88
simple [TCP protocol](http://code.google.com/p/v8/wiki/DebuggerProtocol).
9-
Node has a built-in client for this debugger. To use this, start Node with the
9+
io.js has a built-in client for this debugger. To use this, start io.js with the
1010
`debug` argument; a prompt will appear:
1111

12-
% node debug myscript.js
12+
% iojs debug myscript.js
1313
< debugger listening on port 5858
1414
connecting... ok
1515
break in /home/indutny/Code/git/indutny/myscript.js:1
@@ -18,7 +18,7 @@ Node has a built-in client for this debugger. To use this, start Node with the
1818
3 debugger;
1919
debug>
2020

21-
Node's debugger client doesn't support the full range of commands, but
21+
io.js's debugger client doesn't support the full range of commands, but
2222
simple step and inspection is possible. By putting the statement `debugger;`
2323
into the source code of your script, you will enable a breakpoint.
2424

@@ -34,7 +34,7 @@ For example, suppose `myscript.js` looked like this:
3434

3535
Then once the debugger is run, it will break on line 4.
3636

37-
% node debug myscript.js
37+
% iojs debug myscript.js
3838
< debugger listening on port 5858
3939
connecting... ok
4040
break in /home/indutny/Code/git/indutny/myscript.js:1
@@ -113,7 +113,7 @@ on line 1
113113
It is also possible to set a breakpoint in a file (module) that
114114
isn't loaded yet:
115115

116-
% ./node debug test/fixtures/break-in-module/main.js
116+
% ./iojs debug test/fixtures/break-in-module/main.js
117117
< debugger listening on port 5858
118118
connecting to port 5858... ok
119119
break in test/fixtures/break-in-module/main.js:1
@@ -158,13 +158,13 @@ breakpoint)
158158

159159
## Advanced Usage
160160

161-
The V8 debugger can be enabled and accessed either by starting Node with
162-
the `--debug` command-line flag or by signaling an existing Node process
161+
The V8 debugger can be enabled and accessed either by starting io.js with
162+
the `--debug` command-line flag or by signaling an existing io.js process
163163
with `SIGUSR1`.
164164

165165
Once a process has been set in debug mode with this it can be connected to
166-
with the node debugger. Either connect to the `pid` or the URI to the debugger.
166+
with the io.js debugger. Either connect to the `pid` or the URI to the debugger.
167167
The syntax is:
168168

169-
* `node debug -p <pid>` - Connects to the process via the `pid`
170-
* `node debug <URI>` - Connects to the process via the URI such as localhost:5858
169+
* `iojs debug -p <pid>` - Connects to the process via the `pid`
170+
* `iojs debug <URI>` - Connects to the process via the URI such as localhost:5858

doc/api/dgram.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ and the `callback`(if specified) is called. Specifying both a
170170
"listening" event listener and `callback` is not harmful but not very
171171
useful.
172172

173-
A bound datagram socket keeps the node process running to receive
173+
A bound datagram socket keeps the io.js process running to receive
174174
datagrams.
175175

176176
If binding fails, an "error" event is generated. In rare case (e.g.

doc/api/dns.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ It's only an operating system facility that can associate name with addresses,
103103
and vice versa.
104104

105105
Its implementation can have subtle but important consequences on the behavior
106-
of any Node.js program. Please take some time to consult the [Implementation
106+
of any io.js program. Please take some time to consult the [Implementation
107107
considerations section](#dns_implementation_considerations) before using it.
108108

109109
## dns.lookupService(address, port, callback)
@@ -275,7 +275,7 @@ were found, then return IPv4 mapped IPv6 addresses.
275275
Although `dns.lookup` and `dns.resolve*/dns.reverse` functions have the same
276276
goal of associating a network name with a network address (or vice versa),
277277
their behavior is quite different. These differences can have subtle but
278-
significant consequences on the behavior of Node.js programs.
278+
significant consequences on the behavior of io.js programs.
279279

280280
### dns.lookup
281281

doc/api/documentation.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<!-- type=misc -->
44

5-
The goal of this documentation is to comprehensively explain the Node.js
5+
The goal of this documentation is to comprehensively explain the io.js
66
API, both from a reference as well as a conceptual point of view. Each
77
section describes a built-in module or high-level concept.
88

@@ -25,7 +25,7 @@ The HTML template is located at `doc/template.html`.
2525
<!--type=misc-->
2626

2727
Throughout the documentation, you will see indications of a section's
28-
stability. The Node.js API is still somewhat changing, and as it
28+
stability. The io.js API is still somewhat changing, and as it
2929
matures, certain parts are more reliable than others. Some are so
3030
proven, and so relied upon, that they are unlikely to ever change at
3131
all. Others are brand new and experimental, or known to be hazardous

doc/api/domain.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ time, and stop listening for new requests in that worker.
3838

3939
In this way, `domain` usage goes hand-in-hand with the cluster module,
4040
since the master process can fork a new worker when a worker
41-
encounters an error. For node programs that scale to multiple
41+
encounters an error. For io.js programs that scale to multiple
4242
machines, the terminating proxy or service registry can take note of
4343
the failure, and react accordingly.
4444

doc/api/events.markdown

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<!--type=module-->
66

7-
Many objects in Node emit events: a `net.Server` emits an event each time
7+
Many objects in io.js emit events: a `net.Server` emits an event each time
88
a peer connects to it, a `fs.readStream` emits an event when the file is
99
opened. All objects which emit events are instances of `events.EventEmitter`.
1010
You can access this module by doing: `require("events");`
@@ -23,9 +23,9 @@ attached to.
2323
To access the EventEmitter class, `require('events').EventEmitter`.
2424

2525
When an `EventEmitter` instance experiences an error, the typical action is
26-
to emit an `'error'` event. Error events are treated as a special case in node.
27-
If there is no listener for it, then the default action is to print a stack
28-
trace and exit the program.
26+
to emit an `'error'` event. Error events are treated as a special case in
27+
io.js. If there is no listener for it, then the default action is to print
28+
a stack trace and exit the program.
2929

3030
All EventEmitters emit the event `'newListener'` when new listeners are
3131
added and `'removeListener'` when a listener is removed.

0 commit comments

Comments
 (0)