Browse Source

doc/tools: fix more type inconsistencies

- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: https://github.com/nodejs/node/pull/11697
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
v6
Roman Reiss 8 years ago
parent
commit
5f32024055
No known key found for this signature in database GPG Key ID: 2E62B41C93869443
  1. 2
      doc/api/assert.md
  2. 204
      doc/api/buffer.md
  3. 32
      doc/api/child_process.md
  4. 8
      doc/api/cluster.md
  5. 10
      doc/api/console.md
  6. 20
      doc/api/crypto.md
  7. 4
      doc/api/dns.md
  8. 18
      doc/api/errors.md
  9. 354
      doc/api/fs.md
  10. 4
      doc/api/globals.md
  11. 8
      doc/api/http.md
  12. 6
      doc/api/modules.md
  13. 2
      doc/api/net.md
  14. 24
      doc/api/os.md
  15. 22
      doc/api/path.md
  16. 44
      doc/api/process.md
  17. 2
      doc/api/repl.md
  18. 8
      doc/api/stream.md
  19. 38
      doc/api/url.md
  20. 9
      tools/doc/type-parser.js

2
doc/api/assert.md

@ -248,7 +248,7 @@ added: v0.1.21
* `actual` {any} * `actual` {any}
* `expected` {any} * `expected` {any}
* `message` {any} * `message` {any}
* `operator` {String} * `operator` {string}
Throws an `AssertionError`. If `message` is falsy, the error message is set as Throws an `AssertionError`. If `message` is falsy, the error message is set as
the values of `actual` and `expected` separated by the provided `operator`. the values of `actual` and `expected` separated by the provided `operator`.

204
doc/api/buffer.md

@ -357,8 +357,8 @@ changes:
* `arrayBuffer` {ArrayBuffer} An [`ArrayBuffer`] or the `.buffer` property of a * `arrayBuffer` {ArrayBuffer} An [`ArrayBuffer`] or the `.buffer` property of a
[`TypedArray`]. [`TypedArray`].
* `byteOffset` {Integer} Index of first byte to expose. **Default:** `0` * `byteOffset` {integer} Index of first byte to expose. **Default:** `0`
* `length` {Integer} Number of bytes to expose. * `length` {integer} Number of bytes to expose.
**Default:** `arrayBuffer.length - byteOffset` **Default:** `arrayBuffer.length - byteOffset`
This creates a view of the [`ArrayBuffer`] without copying the underlying This creates a view of the [`ArrayBuffer`] without copying the underlying
@ -438,7 +438,7 @@ changes:
> Stability: 0 - Deprecated: Use [`Buffer.alloc()`] instead (also see > Stability: 0 - Deprecated: Use [`Buffer.alloc()`] instead (also see
> [`Buffer.allocUnsafe()`]). > [`Buffer.allocUnsafe()`]).
* `size` {Integer} The desired length of the new `Buffer` * `size` {integer} The desired length of the new `Buffer`
Allocates a new `Buffer` of `size` bytes. If the `size` is larger than Allocates a new `Buffer` of `size` bytes. If the `size` is larger than
[`buffer.kMaxLength`] or smaller than 0, a [`RangeError`] will be thrown. [`buffer.kMaxLength`] or smaller than 0, a [`RangeError`] will be thrown.
@ -507,8 +507,8 @@ console.log(buf2.toString());
added: v5.10.0 added: v5.10.0
--> -->
* `size` {Integer} The desired length of the new `Buffer` * `size` {integer} The desired length of the new `Buffer`
* `fill` {string | Buffer | Integer} A value to pre-fill the new `Buffer` with. * `fill` {string|Buffer|integer} A value to pre-fill the new `Buffer` with.
**Default:** `0` **Default:** `0`
* `encoding` {string} If `fill` is a string, this is its encoding. * `encoding` {string} If `fill` is a string, this is its encoding.
**Default:** `'utf8'` **Default:** `'utf8'`
@ -568,7 +568,7 @@ changes:
description: Passing a negative `size` will now throw an error. description: Passing a negative `size` will now throw an error.
--> -->
* `size` {Integer} The desired length of the new `Buffer` * `size` {integer} The desired length of the new `Buffer`
Allocates a new `Buffer` of `size` bytes. If the `size` is larger than Allocates a new `Buffer` of `size` bytes. If the `size` is larger than
[`buffer.kMaxLength`] or smaller than 0, a [`RangeError`] will be thrown. [`buffer.kMaxLength`] or smaller than 0, a [`RangeError`] will be thrown.
@ -614,7 +614,7 @@ additional performance that [`Buffer.allocUnsafe()`] provides.
added: v5.10.0 added: v5.10.0
--> -->
* `size` {Integer} The desired length of the new `Buffer` * `size` {integer} The desired length of the new `Buffer`
Allocates a new `Buffer` of `size` bytes. If the `size` is larger than Allocates a new `Buffer` of `size` bytes. If the `size` is larger than
[`buffer.kMaxLength`] or smaller than 0, a [`RangeError`] will be thrown. [`buffer.kMaxLength`] or smaller than 0, a [`RangeError`] will be thrown.
@ -674,11 +674,11 @@ changes:
or `ArrayBuffer`. or `ArrayBuffer`.
--> -->
* `string` {string | Buffer | TypedArray | DataView | ArrayBuffer} A value to * `string` {string|Buffer|TypedArray|DataView|ArrayBuffer} A value to
calculate the length of calculate the length of
* `encoding` {string} If `string` is a string, this is its encoding. * `encoding` {string} If `string` is a string, this is its encoding.
**Default:** `'utf8'` **Default:** `'utf8'`
* Returns: {Integer} The number of bytes contained within `string` * Returns: {integer} The number of bytes contained within `string`
Returns the actual byte length of a string. This is not the same as Returns the actual byte length of a string. This is not the same as
[`String.prototype.length`] since that returns the number of *characters* in [`String.prototype.length`] since that returns the number of *characters* in
@ -712,7 +712,7 @@ changes:
* `buf1` {Buffer|Uint8Array} * `buf1` {Buffer|Uint8Array}
* `buf2` {Buffer|Uint8Array} * `buf2` {Buffer|Uint8Array}
* Returns: {Integer} * Returns: {integer}
Compares `buf1` to `buf2` typically for the purpose of sorting arrays of Compares `buf1` to `buf2` typically for the purpose of sorting arrays of
`Buffer` instances. This is equivalent to calling `Buffer` instances. This is equivalent to calling
@ -740,7 +740,7 @@ changes:
--> -->
* `list` {Array} List of `Buffer` or [`Uint8Array`] instances to concat * `list` {Array} List of `Buffer` or [`Uint8Array`] instances to concat
* `totalLength` {Integer} Total length of the `Buffer` instances in `list` * `totalLength` {integer} Total length of the `Buffer` instances in `list`
when concatenated when concatenated
* Returns: {Buffer} * Returns: {Buffer}
@ -800,8 +800,8 @@ added: v5.10.0
* `arrayBuffer` {ArrayBuffer} An [`ArrayBuffer`] or the `.buffer` property of a * `arrayBuffer` {ArrayBuffer} An [`ArrayBuffer`] or the `.buffer` property of a
[`TypedArray`]. [`TypedArray`].
* `byteOffset` {Integer} Index of first byte to expose. **Default:** `0` * `byteOffset` {integer} Index of first byte to expose. **Default:** `0`
* `length` {Integer} Number of bytes to expose. * `length` {integer} Number of bytes to expose.
**Default:** `arrayBuffer.length - byteOffset` **Default:** `arrayBuffer.length - byteOffset`
This creates a view of the [`ArrayBuffer`] without copying the underlying This creates a view of the [`ArrayBuffer`] without copying the underlying
@ -908,7 +908,7 @@ added: v0.1.101
--> -->
* `obj` {Object} * `obj` {Object}
* Returns: {Boolean} * Returns: {boolean}
Returns `true` if `obj` is a `Buffer`, `false` otherwise. Returns `true` if `obj` is a `Buffer`, `false` otherwise.
@ -918,7 +918,7 @@ added: v0.9.1
--> -->
* `encoding` {string} A character encoding name to check * `encoding` {string} A character encoding name to check
* Returns: {Boolean} * Returns: {boolean}
Returns `true` if `encoding` contains a supported character encoding, or `false` Returns `true` if `encoding` contains a supported character encoding, or `false`
otherwise. otherwise.
@ -928,7 +928,7 @@ otherwise.
added: v0.11.3 added: v0.11.3
--> -->
* {Integer} **Default:** `8192` * {integer} **Default:** `8192`
This is the number of bytes used to determine the size of pre-allocated, internal This is the number of bytes used to determine the size of pre-allocated, internal
`Buffer` instances used for pooling. This value may be modified. `Buffer` instances used for pooling. This value may be modified.
@ -983,17 +983,17 @@ changes:
--> -->
* `target` {Buffer|Uint8Array} A `Buffer` or [`Uint8Array`] to compare to * `target` {Buffer|Uint8Array} A `Buffer` or [`Uint8Array`] to compare to
* `targetStart` {Integer} The offset within `target` at which to begin * `targetStart` {integer} The offset within `target` at which to begin
comparison. **Default:** `0` comparison. **Default:** `0`
* `targetEnd` {Integer} The offset with `target` at which to end comparison * `targetEnd` {integer} The offset with `target` at which to end comparison
(not inclusive). Ignored when `targetStart` is `undefined`. (not inclusive). Ignored when `targetStart` is `undefined`.
**Default:** `target.length` **Default:** `target.length`
* `sourceStart` {Integer} The offset within `buf` at which to begin comparison. * `sourceStart` {integer} The offset within `buf` at which to begin comparison.
Ignored when `targetStart` is `undefined`. **Default:** `0` Ignored when `targetStart` is `undefined`. **Default:** `0`
* `sourceEnd` {Integer} The offset within `buf` at which to end comparison * `sourceEnd` {integer} The offset within `buf` at which to end comparison
(not inclusive). Ignored when `targetStart` is `undefined`. (not inclusive). Ignored when `targetStart` is `undefined`.
**Default:** [`buf.length`] **Default:** [`buf.length`]
* Returns: {Integer} * Returns: {integer}
Compares `buf` with `target` and returns a number indicating whether `buf` Compares `buf` with `target` and returns a number indicating whether `buf`
comes before, after, or is the same as `target` in sort order. comes before, after, or is the same as `target` in sort order.
@ -1059,13 +1059,13 @@ added: v0.1.90
--> -->
* `target` {Buffer|Uint8Array} A `Buffer` or [`Uint8Array`] to copy into. * `target` {Buffer|Uint8Array} A `Buffer` or [`Uint8Array`] to copy into.
* `targetStart` {Integer} The offset within `target` at which to begin * `targetStart` {integer} The offset within `target` at which to begin
copying to. **Default:** `0` copying to. **Default:** `0`
* `sourceStart` {Integer} The offset within `buf` at which to begin copying from. * `sourceStart` {integer} The offset within `buf` at which to begin copying from.
Ignored when `targetStart` is `undefined`. **Default:** `0` Ignored when `targetStart` is `undefined`. **Default:** `0`
* `sourceEnd` {Integer} The offset within `buf` at which to stop copying (not * `sourceEnd` {integer} The offset within `buf` at which to stop copying (not
inclusive). Ignored when `sourceStart` is `undefined`. **Default:** [`buf.length`] inclusive). Ignored when `sourceStart` is `undefined`. **Default:** [`buf.length`]
* Returns: {Integer} The number of bytes copied. * Returns: {integer} The number of bytes copied.
Copies data from a region of `buf` to a region in `target` even if the `target` Copies data from a region of `buf` to a region in `target` even if the `target`
memory region overlaps with `buf`. memory region overlaps with `buf`.
@ -1142,7 +1142,7 @@ changes:
--> -->
* `otherBuffer` {Buffer} A `Buffer` or [`Uint8Array`] to compare to * `otherBuffer` {Buffer} A `Buffer` or [`Uint8Array`] to compare to
* Returns: {Boolean} * Returns: {boolean}
Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes, Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,
`false` otherwise. `false` otherwise.
@ -1170,9 +1170,9 @@ changes:
description: The `encoding` parameter is supported now. description: The `encoding` parameter is supported now.
--> -->
* `value` {string | Buffer | Integer} The value to fill `buf` with * `value` {string|Buffer|integer} The value to fill `buf` with
* `offset` {Integer} Where to start filling `buf`. **Default:** `0` * `offset` {integer} Where to start filling `buf`. **Default:** `0`
* `end` {Integer} Where to stop filling `buf` (not inclusive). **Default:** [`buf.length`] * `end` {integer} Where to stop filling `buf` (not inclusive). **Default:** [`buf.length`]
* `encoding` {string} If `value` is a string, this is its encoding. * `encoding` {string} If `value` is a string, this is its encoding.
**Default:** `'utf8'` **Default:** `'utf8'`
* Returns: {Buffer} A reference to `buf` * Returns: {Buffer} A reference to `buf`
@ -1207,11 +1207,11 @@ console.log(Buffer.allocUnsafe(3).fill('\u0222'));
added: v5.3.0 added: v5.3.0
--> -->
* `value` {string | Buffer | Integer} What to search for * `value` {string|Buffer|integer} What to search for
* `byteOffset` {Integer} Where to begin searching in `buf`. **Default:** `0` * `byteOffset` {integer} Where to begin searching in `buf`. **Default:** `0`
* `encoding` {string} If `value` is a string, this is its encoding. * `encoding` {string} If `value` is a string, this is its encoding.
**Default:** `'utf8'` **Default:** `'utf8'`
* Returns: {Boolean} `true` if `value` was found in `buf`, `false` otherwise * Returns: {boolean} `true` if `value` was found in `buf`, `false` otherwise
Equivalent to [`buf.indexOf() !== -1`][`buf.indexOf()`]. Equivalent to [`buf.indexOf() !== -1`][`buf.indexOf()`].
@ -1256,11 +1256,11 @@ changes:
is no longer required. is no longer required.
--> -->
* `value` {string | Buffer | Uint8Array | Integer} What to search for * `value` {string|Buffer|Uint8Array|integer} What to search for
* `byteOffset` {Integer} Where to begin searching in `buf`. **Default:** `0` * `byteOffset` {integer} Where to begin searching in `buf`. **Default:** `0`
* `encoding` {string} If `value` is a string, this is its encoding. * `encoding` {string} If `value` is a string, this is its encoding.
**Default:** `'utf8'` **Default:** `'utf8'`
* Returns: {Integer} The index of the first occurrence of `value` in `buf` or `-1` * Returns: {integer} The index of the first occurrence of `value` in `buf` or `-1`
if `buf` does not contain `value` if `buf` does not contain `value`
If `value` is: If `value` is:
@ -1365,12 +1365,12 @@ changes:
description: The `value` can now be a `Uint8Array`. description: The `value` can now be a `Uint8Array`.
--> -->
* `value` {string | Buffer | Uint8Array | Integer} What to search for * `value` {string|Buffer|Uint8Array|integer} What to search for
* `byteOffset` {Integer} Where to begin searching in `buf`. * `byteOffset` {integer} Where to begin searching in `buf`.
**Default:** [`buf.length`]` - 1` **Default:** [`buf.length`]` - 1`
* `encoding` {string} If `value` is a string, this is its encoding. * `encoding` {string} If `value` is a string, this is its encoding.
**Default:** `'utf8'` **Default:** `'utf8'`
* Returns: {Integer} The index of the last occurrence of `value` in `buf` or `-1` * Returns: {integer} The index of the last occurrence of `value` in `buf` or `-1`
if `buf` does not contain `value` if `buf` does not contain `value`
Identical to [`buf.indexOf()`], except `buf` is searched from back to front Identical to [`buf.indexOf()`], except `buf` is searched from back to front
@ -1445,7 +1445,7 @@ console.log(b.lastIndexOf('b', []));
added: v0.1.90 added: v0.1.90
--> -->
* {Integer} * {integer}
Returns the amount of memory allocated for `buf` in bytes. Note that this Returns the amount of memory allocated for `buf` in bytes. Note that this
does not necessarily reflect the amount of "usable" data within `buf`. does not necessarily reflect the amount of "usable" data within `buf`.
@ -1500,9 +1500,9 @@ The `buf.parent` property is a deprecated alias for `buf.buffer`.
added: v0.11.15 added: v0.11.15
--> -->
* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 8` * `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 8`
* `noAssert` {boolean} Skip `offset` validation? **Default:** `false` * `noAssert` {boolean} Skip `offset` validation? **Default:** `false`
* Returns: {Number} * Returns: {number}
Reads a 64-bit double from `buf` at the specified `offset` with specified Reads a 64-bit double from `buf` at the specified `offset` with specified
endian format (`readDoubleBE()` returns big endian, `readDoubleLE()` returns endian format (`readDoubleBE()` returns big endian, `readDoubleLE()` returns
@ -1536,9 +1536,9 @@ console.log(buf.readDoubleLE(1, true));
added: v0.11.15 added: v0.11.15
--> -->
* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 4` * `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 4`
* `noAssert` {boolean} Skip `offset` validation? **Default:** `false` * `noAssert` {boolean} Skip `offset` validation? **Default:** `false`
* Returns: {Number} * Returns: {number}
Reads a 32-bit float from `buf` at the specified `offset` with specified Reads a 32-bit float from `buf` at the specified `offset` with specified
endian format (`readFloatBE()` returns big endian, `readFloatLE()` returns endian format (`readFloatBE()` returns big endian, `readFloatLE()` returns
@ -1571,9 +1571,9 @@ console.log(buf.readFloatLE(1, true));
added: v0.5.0 added: v0.5.0
--> -->
* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 1` * `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 1`
* `noAssert` {boolean} Skip `offset` validation? **Default:** `false` * `noAssert` {boolean} Skip `offset` validation? **Default:** `false`
* Returns: {Integer} * Returns: {integer}
Reads a signed 8-bit integer from `buf` at the specified `offset`. Reads a signed 8-bit integer from `buf` at the specified `offset`.
@ -1603,9 +1603,9 @@ console.log(buf.readInt8(2));
added: v0.5.5 added: v0.5.5
--> -->
* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 2` * `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 2`
* `noAssert` {boolean} Skip `offset` validation? **Default:** `false` * `noAssert` {boolean} Skip `offset` validation? **Default:** `false`
* Returns: {Integer} * Returns: {integer}
Reads a signed 16-bit integer from `buf` at the specified `offset` with Reads a signed 16-bit integer from `buf` at the specified `offset` with
the specified endian format (`readInt16BE()` returns big endian, the specified endian format (`readInt16BE()` returns big endian,
@ -1637,9 +1637,9 @@ console.log(buf.readInt16LE(1));
added: v0.5.5 added: v0.5.5
--> -->
* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 4` * `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 4`
* `noAssert` {boolean} Skip `offset` validation? **Default:** `false` * `noAssert` {boolean} Skip `offset` validation? **Default:** `false`
* Returns: {Integer} * Returns: {integer}
Reads a signed 32-bit integer from `buf` at the specified `offset` with Reads a signed 32-bit integer from `buf` at the specified `offset` with
the specified endian format (`readInt32BE()` returns big endian, the specified endian format (`readInt32BE()` returns big endian,
@ -1671,10 +1671,10 @@ console.log(buf.readInt32LE(1));
added: v0.11.15 added: v0.11.15
--> -->
* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - byteLength` * `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - byteLength`
* `byteLength` {Integer} How many bytes to read. Must satisfy: `0 < byteLength <= 6` * `byteLength` {integer} How many bytes to read. Must satisfy: `0 < byteLength <= 6`
* `noAssert` {boolean} Skip `offset` and `byteLength` validation? **Default:** `false` * `noAssert` {boolean} Skip `offset` and `byteLength` validation? **Default:** `false`
* Returns: {Integer} * Returns: {integer}
Reads `byteLength` number of bytes from `buf` at the specified `offset` Reads `byteLength` number of bytes from `buf` at the specified `offset`
and interprets the result as a two's complement signed value. Supports up to 48 and interprets the result as a two's complement signed value. Supports up to 48
@ -1703,9 +1703,9 @@ console.log(buf.readIntBE(1, 6).toString(16));
added: v0.5.0 added: v0.5.0
--> -->
* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 1` * `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 1`
* `noAssert` {boolean} Skip `offset` validation? **Default:** `false` * `noAssert` {boolean} Skip `offset` validation? **Default:** `false`
* Returns: {Integer} * Returns: {integer}
Reads an unsigned 8-bit integer from `buf` at the specified `offset`. Reads an unsigned 8-bit integer from `buf` at the specified `offset`.
@ -1733,9 +1733,9 @@ console.log(buf.readUInt8(2));
added: v0.5.5 added: v0.5.5
--> -->
* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 2` * `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 2`
* `noAssert` {boolean} Skip `offset` validation? **Default:** `false` * `noAssert` {boolean} Skip `offset` validation? **Default:** `false`
* Returns: {Integer} * Returns: {integer}
Reads an unsigned 16-bit integer from `buf` at the specified `offset` with Reads an unsigned 16-bit integer from `buf` at the specified `offset` with
specified endian format (`readUInt16BE()` returns big endian, `readUInt16LE()` specified endian format (`readUInt16BE()` returns big endian, `readUInt16LE()`
@ -1771,9 +1771,9 @@ console.log(buf.readUInt16LE(2).toString(16));
added: v0.5.5 added: v0.5.5
--> -->
* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 4` * `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - 4`
* `noAssert` {boolean} Skip `offset` validation? **Default:** `false` * `noAssert` {boolean} Skip `offset` validation? **Default:** `false`
* Returns: {Integer} * Returns: {integer}
Reads an unsigned 32-bit integer from `buf` at the specified `offset` with Reads an unsigned 32-bit integer from `buf` at the specified `offset` with
specified endian format (`readUInt32BE()` returns big endian, specified endian format (`readUInt32BE()` returns big endian,
@ -1803,10 +1803,10 @@ console.log(buf.readUInt32LE(1).toString(16));
added: v0.11.15 added: v0.11.15
--> -->
* `offset` {Integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - byteLength` * `offset` {integer} Where to start reading. Must satisfy: `0 <= offset <= buf.length - byteLength`
* `byteLength` {Integer} How many bytes to read. Must satisfy: `0 < byteLength <= 6` * `byteLength` {integer} How many bytes to read. Must satisfy: `0 < byteLength <= 6`
* `noAssert` {boolean} Skip `offset` and `byteLength` validation? **Default:** `false` * `noAssert` {boolean} Skip `offset` and `byteLength` validation? **Default:** `false`
* Returns: {Integer} * Returns: {integer}
Reads `byteLength` number of bytes from `buf` at the specified `offset` Reads `byteLength` number of bytes from `buf` at the specified `offset`
and interprets the result as an unsigned integer. Supports up to 48 and interprets the result as an unsigned integer. Supports up to 48
@ -1844,8 +1844,8 @@ changes:
calculations with them. calculations with them.
--> -->
* `start` {Integer} Where the new `Buffer` will start. **Default:** `0` * `start` {integer} Where the new `Buffer` will start. **Default:** `0`
* `end` {Integer} Where the new `Buffer` will end (not inclusive). * `end` {integer} Where the new `Buffer` will end (not inclusive).
**Default:** [`buf.length`] **Default:** [`buf.length`]
* Returns: {Buffer} * Returns: {Buffer}
@ -2026,10 +2026,10 @@ added: v0.1.90
--> -->
* `encoding` {string} The character encoding to decode to. **Default:** `'utf8'` * `encoding` {string} The character encoding to decode to. **Default:** `'utf8'`
* `start` {Integer} The byte offset to start decoding at. **Default:** `0` * `start` {integer} The byte offset to start decoding at. **Default:** `0`
* `end` {Integer} The byte offset to stop decoding at (not inclusive). * `end` {integer} The byte offset to stop decoding at (not inclusive).
**Default:** [`buf.length`] **Default:** [`buf.length`]
* Returns: {String} * Returns: {string}
Decodes `buf` to a string according to the specified character encoding in Decodes `buf` to a string according to the specified character encoding in
`encoding`. `start` and `end` may be passed to decode only a subset of `buf`. `encoding`. `start` and `end` may be passed to decode only a subset of `buf`.
@ -2107,10 +2107,10 @@ added: v0.1.90
--> -->
* `string` {string} String to be written to `buf` * `string` {string} String to be written to `buf`
* `offset` {Integer} Where to start writing `string`. **Default:** `0` * `offset` {integer} Where to start writing `string`. **Default:** `0`
* `length` {Integer} How many bytes to write. **Default:** `buf.length - offset` * `length` {integer} How many bytes to write. **Default:** `buf.length - offset`
* `encoding` {string} The character encoding of `string`. **Default:** `'utf8'` * `encoding` {string} The character encoding of `string`. **Default:** `'utf8'`
* Returns: {Integer} Number of bytes written * Returns: {integer} Number of bytes written
Writes `string` to `buf` at `offset` according to the character encoding in `encoding`. Writes `string` to `buf` at `offset` according to the character encoding in `encoding`.
The `length` parameter is the number of bytes to write. If `buf` did not contain The `length` parameter is the number of bytes to write. If `buf` did not contain
@ -2135,9 +2135,9 @@ added: v0.11.15
--> -->
* `value` {number} Number to be written to `buf` * `value` {number} Number to be written to `buf`
* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 8` * `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 8`
* `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false` * `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false`
* Returns: {Integer} `offset` plus the number of bytes written * Returns: {integer} `offset` plus the number of bytes written
Writes `value` to `buf` at the specified `offset` with specified endian Writes `value` to `buf` at the specified `offset` with specified endian
format (`writeDoubleBE()` writes big endian, `writeDoubleLE()` writes little format (`writeDoubleBE()` writes big endian, `writeDoubleLE()` writes little
@ -2170,9 +2170,9 @@ added: v0.11.15
--> -->
* `value` {number} Number to be written to `buf` * `value` {number} Number to be written to `buf`
* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 4` * `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 4`
* `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false` * `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false`
* Returns: {Integer} `offset` plus the number of bytes written * Returns: {integer} `offset` plus the number of bytes written
Writes `value` to `buf` at the specified `offset` with specified endian Writes `value` to `buf` at the specified `offset` with specified endian
format (`writeFloatBE()` writes big endian, `writeFloatLE()` writes little format (`writeFloatBE()` writes big endian, `writeFloatLE()` writes little
@ -2203,10 +2203,10 @@ console.log(buf);
added: v0.5.0 added: v0.5.0
--> -->
* `value` {Integer} Number to be written to `buf` * `value` {integer} Number to be written to `buf`
* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 1` * `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 1`
* `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false` * `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false`
* Returns: {Integer} `offset` plus the number of bytes written * Returns: {integer} `offset` plus the number of bytes written
Writes `value` to `buf` at the specified `offset`. `value` *should* be a valid Writes `value` to `buf` at the specified `offset`. `value` *should* be a valid
signed 8-bit integer. Behavior is undefined when `value` is anything other than signed 8-bit integer. Behavior is undefined when `value` is anything other than
@ -2235,10 +2235,10 @@ console.log(buf);
added: v0.5.5 added: v0.5.5
--> -->
* `value` {Integer} Number to be written to `buf` * `value` {integer} Number to be written to `buf`
* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 2` * `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 2`
* `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false` * `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false`
* Returns: {Integer} `offset` plus the number of bytes written * Returns: {integer} `offset` plus the number of bytes written
Writes `value` to `buf` at the specified `offset` with specified endian Writes `value` to `buf` at the specified `offset` with specified endian
format (`writeInt16BE()` writes big endian, `writeInt16LE()` writes little format (`writeInt16BE()` writes big endian, `writeInt16LE()` writes little
@ -2268,10 +2268,10 @@ console.log(buf);
added: v0.5.5 added: v0.5.5
--> -->
* `value` {Integer} Number to be written to `buf` * `value` {integer} Number to be written to `buf`
* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 4` * `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 4`
* `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false` * `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false`
* Returns: {Integer} `offset` plus the number of bytes written * Returns: {integer} `offset` plus the number of bytes written
Writes `value` to `buf` at the specified `offset` with specified endian Writes `value` to `buf` at the specified `offset` with specified endian
format (`writeInt32BE()` writes big endian, `writeInt32LE()` writes little format (`writeInt32BE()` writes big endian, `writeInt32LE()` writes little
@ -2301,12 +2301,12 @@ console.log(buf);
added: v0.11.15 added: v0.11.15
--> -->
* `value` {Integer} Number to be written to `buf` * `value` {integer} Number to be written to `buf`
* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - byteLength` * `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - byteLength`
* `byteLength` {Integer} How many bytes to write. Must satisfy: `0 < byteLength <= 6` * `byteLength` {integer} How many bytes to write. Must satisfy: `0 < byteLength <= 6`
* `noAssert` {boolean} Skip `value`, `offset`, and `byteLength` validation? * `noAssert` {boolean} Skip `value`, `offset`, and `byteLength` validation?
**Default:** `false` **Default:** `false`
* Returns: {Integer} `offset` plus the number of bytes written * Returns: {integer} `offset` plus the number of bytes written
Writes `byteLength` bytes of `value` to `buf` at the specified `offset`. Writes `byteLength` bytes of `value` to `buf` at the specified `offset`.
Supports up to 48 bits of accuracy. Behavior is undefined when `value` is Supports up to 48 bits of accuracy. Behavior is undefined when `value` is
@ -2336,10 +2336,10 @@ console.log(buf);
added: v0.5.0 added: v0.5.0
--> -->
* `value` {Integer} Number to be written to `buf` * `value` {integer} Number to be written to `buf`
* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 1` * `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 1`
* `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false` * `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false`
* Returns: {Integer} `offset` plus the number of bytes written * Returns: {integer} `offset` plus the number of bytes written
Writes `value` to `buf` at the specified `offset`. `value` *should* be a Writes `value` to `buf` at the specified `offset`. `value` *should* be a
valid unsigned 8-bit integer. Behavior is undefined when `value` is anything valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
@ -2368,10 +2368,10 @@ console.log(buf);
added: v0.5.5 added: v0.5.5
--> -->
* `value` {Integer} Number to be written to `buf` * `value` {integer} Number to be written to `buf`
* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 2` * `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 2`
* `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false` * `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false`
* Returns: {Integer} `offset` plus the number of bytes written * Returns: {integer} `offset` plus the number of bytes written
Writes `value` to `buf` at the specified `offset` with specified endian Writes `value` to `buf` at the specified `offset` with specified endian
format (`writeUInt16BE()` writes big endian, `writeUInt16LE()` writes little format (`writeUInt16BE()` writes big endian, `writeUInt16LE()` writes little
@ -2405,10 +2405,10 @@ console.log(buf);
added: v0.5.5 added: v0.5.5
--> -->
* `value` {Integer} Number to be written to `buf` * `value` {integer} Number to be written to `buf`
* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 4` * `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - 4`
* `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false` * `noAssert` {boolean} Skip `value` and `offset` validation? **Default:** `false`
* Returns: {Integer} `offset` plus the number of bytes written * Returns: {integer} `offset` plus the number of bytes written
Writes `value` to `buf` at the specified `offset` with specified endian Writes `value` to `buf` at the specified `offset` with specified endian
format (`writeUInt32BE()` writes big endian, `writeUInt32LE()` writes little format (`writeUInt32BE()` writes big endian, `writeUInt32LE()` writes little
@ -2440,12 +2440,12 @@ console.log(buf);
added: v0.5.5 added: v0.5.5
--> -->
* `value` {Integer} Number to be written to `buf` * `value` {integer} Number to be written to `buf`
* `offset` {Integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - byteLength` * `offset` {integer} Where to start writing. Must satisfy: `0 <= offset <= buf.length - byteLength`
* `byteLength` {Integer} How many bytes to write. Must satisfy: `0 < byteLength <= 6` * `byteLength` {integer} How many bytes to write. Must satisfy: `0 < byteLength <= 6`
* `noAssert` {boolean} Skip `value`, `offset`, and `byteLength` validation? * `noAssert` {boolean} Skip `value`, `offset`, and `byteLength` validation?
**Default:** `false` **Default:** `false`
* Returns: {Integer} `offset` plus the number of bytes written * Returns: {integer} `offset` plus the number of bytes written
Writes `byteLength` bytes of `value` to `buf` at the specified `offset`. Writes `byteLength` bytes of `value` to `buf` at the specified `offset`.
Supports up to 48 bits of accuracy. Behavior is undefined when `value` is Supports up to 48 bits of accuracy. Behavior is undefined when `value` is
@ -2475,7 +2475,7 @@ console.log(buf);
added: v0.5.4 added: v0.5.4
--> -->
* {Integer} **Default:** `50` * {integer} **Default:** `50`
Returns the maximum number of bytes that will be returned when Returns the maximum number of bytes that will be returned when
`buf.inspect()` is called. This can be overridden by user modules. See `buf.inspect()` is called. This can be overridden by user modules. See
@ -2489,7 +2489,7 @@ Note that this is a property on the `buffer` module returned by
added: v3.0.0 added: v3.0.0
--> -->
* {Integer} The largest size allowed for a single `Buffer` instance * {integer} The largest size allowed for a single `Buffer` instance
On 32-bit architectures, this value is `(2^30)-1` (~1GB). On 32-bit architectures, this value is `(2^30)-1` (~1GB).
On 64-bit architectures, this value is `(2^31)-1` (~2GB). On 64-bit architectures, this value is `(2^31)-1` (~2GB).
@ -2580,7 +2580,7 @@ deprecated: v6.0.0
> Stability: 0 - Deprecated: Use [`Buffer.allocUnsafeSlow()`] instead. > Stability: 0 - Deprecated: Use [`Buffer.allocUnsafeSlow()`] instead.
* `size` {Integer} The desired length of the new `SlowBuffer` * `size` {integer} The desired length of the new `SlowBuffer`
Allocates a new `Buffer` of `size` bytes. If the `size` is larger than Allocates a new `Buffer` of `size` bytes. If the `size` is larger than
[`buffer.kMaxLength`] or smaller than 0, a [`RangeError`] will be thrown. [`buffer.kMaxLength`] or smaller than 0, a [`RangeError`] will be thrown.

32
doc/api/child_process.md

@ -135,9 +135,9 @@ added: v0.1.90
understand the `-c` switch on UNIX or `/d /s /c` on Windows. On Windows, understand the `-c` switch on UNIX or `/d /s /c` on Windows. On Windows,
command line parsing should be compatible with `cmd.exe`.) command line parsing should be compatible with `cmd.exe`.)
* `timeout` {number} (Default: `0`) * `timeout` {number} (Default: `0`)
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
stdout or stderr - if exceeded child process is killed (Default: `200*1024`) stdout or stderr - if exceeded child process is killed (Default: `200*1024`)
* `killSignal` {string|Integer} (Default: `'SIGTERM'`) * `killSignal` {string|integer} (Default: `'SIGTERM'`)
* `uid` {number} Sets the user identity of the process. (See setuid(2).) * `uid` {number} Sets the user identity of the process. (See setuid(2).)
* `gid` {number} Sets the group identity of the process. (See setgid(2).) * `gid` {number} Sets the group identity of the process. (See setgid(2).)
* `callback` {Function} called with the output when process terminates * `callback` {Function} called with the output when process terminates
@ -212,9 +212,9 @@ added: v0.1.91
* `env` {Object} Environment key-value pairs * `env` {Object} Environment key-value pairs
* `encoding` {string} (Default: `'utf8'`) * `encoding` {string} (Default: `'utf8'`)
* `timeout` {number} (Default: `0`) * `timeout` {number} (Default: `0`)
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
stdout or stderr - if exceeded child process is killed (Default: `200*1024`) stdout or stderr - if exceeded child process is killed (Default: `200*1024`)
* `killSignal` {string|Integer} (Default: `'SIGTERM'`) * `killSignal` {string|integer} (Default: `'SIGTERM'`)
* `uid` {number} Sets the user identity of the process. (See setuid(2).) * `uid` {number} Sets the user identity of the process. (See setuid(2).)
* `gid` {number} Sets the group identity of the process. (See setgid(2).) * `gid` {number} Sets the group identity of the process. (See setgid(2).)
* `callback` {Function} called with the output when process terminates * `callback` {Function} called with the output when process terminates
@ -608,7 +608,7 @@ changes:
* `input` {string|Buffer|Uint8Array} The value which will be passed as stdin * `input` {string|Buffer|Uint8Array} The value which will be passed as stdin
to the spawned process to the spawned process
- supplying this value will override `stdio[0]` - supplying this value will override `stdio[0]`
* `stdio` {string | Array} Child's stdio configuration. (Default: `'pipe'`) * `stdio` {string|Array} Child's stdio configuration. (Default: `'pipe'`)
- `stderr` by default will be output to the parent process' stderr unless - `stderr` by default will be output to the parent process' stderr unless
`stdio` is specified `stdio` is specified
* `env` {Object} Environment key-value pairs * `env` {Object} Environment key-value pairs
@ -616,9 +616,9 @@ changes:
* `gid` {number} Sets the group identity of the process. (See setgid(2).) * `gid` {number} Sets the group identity of the process. (See setgid(2).)
* `timeout` {number} In milliseconds the maximum amount of time the process * `timeout` {number} In milliseconds the maximum amount of time the process
is allowed to run. (Default: `undefined`) is allowed to run. (Default: `undefined`)
* `killSignal` {string|Integer} The signal value to be used when the spawned * `killSignal` {string|integer} The signal value to be used when the spawned
process will be killed. (Default: `'SIGTERM'`) process will be killed. (Default: `'SIGTERM'`)
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
stdout or stderr - if exceeded child process is killed stdout or stderr - if exceeded child process is killed
* `encoding` {string} The encoding used for all stdio inputs and outputs. (Default: `'buffer'`) * `encoding` {string} The encoding used for all stdio inputs and outputs. (Default: `'buffer'`)
* Returns: {Buffer|string} The stdout from the command * Returns: {Buffer|string} The stdout from the command
@ -650,7 +650,7 @@ changes:
* `input` {string|Buffer|Uint8Array} The value which will be passed as stdin * `input` {string|Buffer|Uint8Array} The value which will be passed as stdin
to the spawned process to the spawned process
- supplying this value will override `stdio[0]` - supplying this value will override `stdio[0]`
* `stdio` {string | Array} Child's stdio configuration. (Default: `'pipe'`) * `stdio` {string|Array} Child's stdio configuration. (Default: `'pipe'`)
- `stderr` by default will be output to the parent process' stderr unless - `stderr` by default will be output to the parent process' stderr unless
`stdio` is specified `stdio` is specified
* `env` {Object} Environment key-value pairs * `env` {Object} Environment key-value pairs
@ -662,9 +662,9 @@ changes:
* `gid` {number} Sets the group identity of the process. (See setgid(2).) * `gid` {number} Sets the group identity of the process. (See setgid(2).)
* `timeout` {number} In milliseconds the maximum amount of time the process * `timeout` {number} In milliseconds the maximum amount of time the process
is allowed to run. (Default: `undefined`) is allowed to run. (Default: `undefined`)
* `killSignal` {string|Integer} The signal value to be used when the spawned * `killSignal` {string|integer} The signal value to be used when the spawned
process will be killed. (Default: `'SIGTERM'`) process will be killed. (Default: `'SIGTERM'`)
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
stdout or stderr - if exceeded child process is killed stdout or stderr - if exceeded child process is killed
* `encoding` {string} The encoding used for all stdio inputs and outputs. * `encoding` {string} The encoding used for all stdio inputs and outputs.
(Default: `'buffer'`) (Default: `'buffer'`)
@ -708,15 +708,15 @@ changes:
* `input` {string|Buffer|Uint8Array} The value which will be passed as stdin * `input` {string|Buffer|Uint8Array} The value which will be passed as stdin
to the spawned process to the spawned process
- supplying this value will override `stdio[0]` - supplying this value will override `stdio[0]`
* `stdio` {string | Array} Child's stdio configuration. * `stdio` {string|Array} Child's stdio configuration.
* `env` {Object} Environment key-value pairs * `env` {Object} Environment key-value pairs
* `uid` {number} Sets the user identity of the process. (See setuid(2).) * `uid` {number} Sets the user identity of the process. (See setuid(2).)
* `gid` {number} Sets the group identity of the process. (See setgid(2).) * `gid` {number} Sets the group identity of the process. (See setgid(2).)
* `timeout` {number} In milliseconds the maximum amount of time the process * `timeout` {number} In milliseconds the maximum amount of time the process
is allowed to run. (Default: `undefined`) is allowed to run. (Default: `undefined`)
* `killSignal` {string|Integer} The signal value to be used when the spawned * `killSignal` {string|integer} The signal value to be used when the spawned
process will be killed. (Default: `'SIGTERM'`) process will be killed. (Default: `'SIGTERM'`)
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
stdout or stderr - if exceeded child process is killed stdout or stderr - if exceeded child process is killed
* `encoding` {string} The encoding used for all stdio inputs and outputs. * `encoding` {string} The encoding used for all stdio inputs and outputs.
(Default: `'buffer'`) (Default: `'buffer'`)
@ -846,7 +846,7 @@ IPC channel currently exists, this property is `undefined`.
added: v0.7.2 added: v0.7.2
--> -->
* {Boolean} Set to `false` after `child.disconnect()` is called * {boolean} Set to `false` after `child.disconnect()` is called
The `child.connected` property indicates whether it is still possible to send The `child.connected` property indicates whether it is still possible to send
and receive messages from a child process. When `child.connected` is `false`, it and receive messages from a child process. When `child.connected` is `false`, it
@ -933,7 +933,7 @@ setTimeout(() => {
added: v0.1.90 added: v0.1.90
--> -->
* {Number} Integer * {number} Integer
Returns the process identifier (PID) of the child process. Returns the process identifier (PID) of the child process.
@ -967,7 +967,7 @@ changes:
* `sendHandle` {Handle} * `sendHandle` {Handle}
* `options` {Object} * `options` {Object}
* `callback` {Function} * `callback` {Function}
* Returns: {Boolean} * Returns: {boolean}
When an IPC channel has been established between the parent and child ( When an IPC channel has been established between the parent and child (
i.e. when using [`child_process.fork()`][]), the `child.send()` method can be i.e. when using [`child_process.fork()`][]), the `child.send()` method can be

8
doc/api/cluster.md

@ -332,7 +332,7 @@ if (cluster.isMaster) {
added: v6.0.0 added: v6.0.0
--> -->
* {Boolean} * {boolean}
Set by calling `.kill()` or `.disconnect()`. Until then, it is `undefined`. Set by calling `.kill()` or `.disconnect()`. Until then, it is `undefined`.
@ -356,7 +356,7 @@ worker.kill();
added: v0.8.0 added: v0.8.0
--> -->
* {Number} * {number}
Each new worker is given its own unique id, this id is stored in the Each new worker is given its own unique id, this id is stored in the
`id`. `id`.
@ -691,7 +691,7 @@ This can only be called from the master process.
added: v0.8.1 added: v0.8.1
--> -->
* {Boolean} * {boolean}
True if the process is a master. This is determined True if the process is a master. This is determined
by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID` is by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID` is
@ -702,7 +702,7 @@ undefined, then `isMaster` is `true`.
added: v0.6.0 added: v0.6.0
--> -->
* {Boolean} * {boolean}
True if the process is not a master (it is the negation of `cluster.isMaster`). True if the process is not a master (it is the negation of `cluster.isMaster`).

10
doc/api/console.md

@ -169,9 +169,9 @@ added: v0.1.101
--> -->
* `obj` {any} * `obj` {any}
* `options` {Object} * `options` {Object}
* `showHidden` {Boolean} * `showHidden` {boolean}
* `depth` {Number} * `depth` {number}
* `colors` {Boolean} * `colors` {boolean}
Uses [`util.inspect()`][] on `obj` and prints the resulting string to `stdout`. Uses [`util.inspect()`][] on `obj` and prints the resulting string to `stdout`.
This function bypasses any custom `inspect()` function defined on `obj`. An This function bypasses any custom `inspect()` function defined on `obj`. An
@ -250,7 +250,7 @@ values are concatenated. See [`util.format()`][] for more information.
<!-- YAML <!-- YAML
added: v0.1.104 added: v0.1.104
--> -->
* `label` {String} * `label` {string}
Starts a timer that can be used to compute the duration of an operation. Timers Starts a timer that can be used to compute the duration of an operation. Timers
are identified by a unique `label`. Use the same `label` when you call are identified by a unique `label`. Use the same `label` when you call
@ -266,7 +266,7 @@ changes:
description: This method no longer supports multiple calls that don’t map description: This method no longer supports multiple calls that don’t map
to individual `console.time()` calls; see below for details. to individual `console.time()` calls; see below for details.
--> -->
* `label` {String} * `label` {string}
Stops a timer that was previously started by calling [`console.time()`][] and Stops a timer that was previously started by calling [`console.time()`][] and
prints the result to `stdout`: prints the result to `stdout`:

20
doc/api/crypto.md

@ -937,8 +937,8 @@ The `private_key` argument can be an object or a string. If `private_key` is a
string, it is treated as a raw key with no passphrase. If `private_key` is an string, it is treated as a raw key with no passphrase. If `private_key` is an
object, it is interpreted as a hash containing two properties: object, it is interpreted as a hash containing two properties:
* `key` : {String} - PEM encoded private key * `key`: {string} - PEM encoded private key
* `passphrase` : {String} - passphrase for the private key * `passphrase`: {string} - passphrase for the private key
The `output_format` can specify one of `'latin1'`, `'hex'` or `'base64'`. If The `output_format` can specify one of `'latin1'`, `'hex'` or `'base64'`. If
`output_format` is provided a string is returned; otherwise a [`Buffer`][] is `output_format` is provided a string is returned; otherwise a [`Buffer`][] is
@ -1480,8 +1480,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_OAEP_PADDING`.
If `private_key` is an object, it is interpreted as a hash object with the If `private_key` is an object, it is interpreted as a hash object with the
keys: keys:
* `key` : {String} - PEM encoded private key * `key`: {string} - PEM encoded private key
* `passphrase` : {String} - Optional passphrase for the private key * `passphrase`: {string} - Optional passphrase for the private key
* `padding` : An optional padding value, one of the following: * `padding` : An optional padding value, one of the following:
* `crypto.constants.RSA_NO_PADDING` * `crypto.constants.RSA_NO_PADDING`
* `crypto.constants.RSA_PKCS1_PADDING` * `crypto.constants.RSA_PKCS1_PADDING`
@ -1501,8 +1501,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`.
If `private_key` is an object, it is interpreted as a hash object with the If `private_key` is an object, it is interpreted as a hash object with the
keys: keys:
* `key` : {String} - PEM encoded private key * `key`: {string} - PEM encoded private key
* `passphrase` : {String} - Optional passphrase for the private key * `passphrase`: {string} - Optional passphrase for the private key
* `padding` : An optional padding value, one of the following: * `padding` : An optional padding value, one of the following:
* `crypto.constants.RSA_NO_PADDING` * `crypto.constants.RSA_NO_PADDING`
* `crypto.constants.RSA_PKCS1_PADDING` * `crypto.constants.RSA_PKCS1_PADDING`
@ -1521,8 +1521,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`.
If `public_key` is an object, it is interpreted as a hash object with the If `public_key` is an object, it is interpreted as a hash object with the
keys: keys:
* `key` : {String} - PEM encoded public key * `key`: {string} - PEM encoded public key
* `passphrase` : {String} - Optional passphrase for the private key * `passphrase`: {string} - Optional passphrase for the private key
* `padding` : An optional padding value, one of the following: * `padding` : An optional padding value, one of the following:
* `crypto.constants.RSA_NO_PADDING` * `crypto.constants.RSA_NO_PADDING`
* `crypto.constants.RSA_PKCS1_PADDING` * `crypto.constants.RSA_PKCS1_PADDING`
@ -1545,8 +1545,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_OAEP_PADDING`.
If `public_key` is an object, it is interpreted as a hash object with the If `public_key` is an object, it is interpreted as a hash object with the
keys: keys:
* `key` : {String} - PEM encoded public key * `key`: {string} - PEM encoded public key
* `passphrase` : {String} - Optional passphrase for the private key * `passphrase`: {string} - Optional passphrase for the private key
* `padding` : An optional padding value, one of the following: * `padding` : An optional padding value, one of the following:
* `crypto.constants.RSA_NO_PADDING` * `crypto.constants.RSA_NO_PADDING`
* `crypto.constants.RSA_PKCS1_PADDING` * `crypto.constants.RSA_PKCS1_PADDING`

4
doc/api/dns.md

@ -80,13 +80,13 @@ Alternatively, `options` can be an object containing these properties:
* `family` {number} - The record family. If present, must be the integer * `family` {number} - The record family. If present, must be the integer
`4` or `6`. If not provided, both IP v4 and v6 addresses are accepted. `4` or `6`. If not provided, both IP v4 and v6 addresses are accepted.
* `hints`: {Number} - If present, it should be one or more of the supported * `hints`: {number} - If present, it should be one or more of the supported
`getaddrinfo` flags. If `hints` is not provided, then no flags are passed to `getaddrinfo` flags. If `hints` is not provided, then no flags are passed to
`getaddrinfo`. Multiple flags can be passed through `hints` by bitwise `getaddrinfo`. Multiple flags can be passed through `hints` by bitwise
`OR`ing their values. `OR`ing their values.
See [supported `getaddrinfo` flags][] for more information on supported See [supported `getaddrinfo` flags][] for more information on supported
flags. flags.
* `all`: {Boolean} - When `true`, the callback returns all resolved addresses * `all`: {boolean} - When `true`, the callback returns all resolved addresses
in an array, otherwise returns a single address. Defaults to `false`. in an array, otherwise returns a single address. Defaults to `false`.
All properties are optional. All properties are optional.

18
doc/api/errors.md

@ -243,7 +243,7 @@ new MyError().stack;
### Error.stackTraceLimit ### Error.stackTraceLimit
* {Number} * {number}
The `Error.stackTraceLimit` property specifies the number of stack frames The `Error.stackTraceLimit` property specifies the number of stack frames
collected by a stack trace (whether generated by `new Error().stack` or collected by a stack trace (whether generated by `new Error().stack` or
@ -257,7 +257,7 @@ not capture any frames.
### error.message ### error.message
* {String} * {string}
The `error.message` property is the string description of the error as set by calling `new Error(message)`. The `error.message` property is the string description of the error as set by calling `new Error(message)`.
The `message` passed to the constructor will also appear in the first line of The `message` passed to the constructor will also appear in the first line of
@ -273,7 +273,7 @@ console.error(err.message);
### error.stack ### error.stack
* {String} * {string}
The `error.stack` property is a string describing the point in the code at which The `error.stack` property is a string describing the point in the code at which
the `Error` was instantiated. the `Error` was instantiated.
@ -449,14 +449,14 @@ added properties.
#### error.code #### error.code
* {String} * {string}
The `error.code` property is a string representing the error code, which is always The `error.code` property is a string representing the error code, which is always
`E` followed by a sequence of capital letters. `E` followed by a sequence of capital letters.
#### error.errno #### error.errno
* {String | Number} * {string|number}
The `error.errno` property is a number or a string. The `error.errno` property is a number or a string.
The number is a **negative** value which corresponds to the error code defined in The number is a **negative** value which corresponds to the error code defined in
@ -466,27 +466,27 @@ In case of a string, it is the same as `error.code`.
#### error.syscall #### error.syscall
* {String} * {string}
The `error.syscall` property is a string describing the [syscall][] that failed. The `error.syscall` property is a string describing the [syscall][] that failed.
#### error.path #### error.path
* {String} * {string}
When present (e.g. in `fs` or `child_process`), the `error.path` property is a string When present (e.g. in `fs` or `child_process`), the `error.path` property is a string
containing a relevant invalid pathname. containing a relevant invalid pathname.
#### error.address #### error.address
* {String} * {string}
When present (e.g. in `net` or `dgram`), the `error.address` property is a string When present (e.g. in `net` or `dgram`), the `error.address` property is a string
describing the address to which the connection failed. describing the address to which the connection failed.
#### error.port #### error.port
* {Number} * {number}
When present (e.g. in `net` or `dgram`), the `error.port` property is a number representing When present (e.g. in `net` or `dgram`), the `error.port` property is a number representing
the connection's port that is not available. the connection's port that is not available.

354
doc/api/fs.md

@ -122,7 +122,7 @@ added: v0.5.8
--> -->
* `eventType` {string} The type of fs change * `eventType` {string} The type of fs change
* `filename` {string | Buffer} The filename that changed (if relevant/available) * `filename` {string|Buffer} The filename that changed (if relevant/available)
Emitted when something changes in a watched directory or file. Emitted when something changes in a watched directory or file.
See more details in [`fs.watch()`][]. See more details in [`fs.watch()`][].
@ -177,7 +177,7 @@ using the `fs.close()` method.
added: v0.1.93 added: v0.1.93
--> -->
* `fd` {Integer} Integer file descriptor used by the ReadStream. * `fd` {integer} Integer file descriptor used by the ReadStream.
Emitted when the ReadStream's file is opened. Emitted when the ReadStream's file is opened.
@ -291,7 +291,7 @@ using the `fs.close()` method.
added: v0.1.93 added: v0.1.93
--> -->
* `fd` {Integer} Integer file descriptor used by the WriteStream. * `fd` {integer} Integer file descriptor used by the WriteStream.
Emitted when the WriteStream's file is opened. Emitted when the WriteStream's file is opened.
@ -318,8 +318,8 @@ argument to `fs.createWriteStream()`. If `path` is passed as a string, then
added: v0.11.15 added: v0.11.15
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `mode` {Integer} * `mode` {integer}
* `callback` {Function} * `callback` {Function}
Tests a user's permissions for the file or directory specified by `path`. Tests a user's permissions for the file or directory specified by `path`.
@ -439,8 +439,8 @@ process.
added: v0.11.15 added: v0.11.15
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `mode` {Integer} * `mode` {integer}
Synchronous version of [`fs.access()`][]. This throws if any accessibility Synchronous version of [`fs.access()`][]. This throws if any accessibility
checks fail, and does nothing otherwise. checks fail, and does nothing otherwise.
@ -461,11 +461,11 @@ changes:
description: The `file` parameter can be a file descriptor now. description: The `file` parameter can be a file descriptor now.
--> -->
* `file` {string | Buffer | Number} filename or file descriptor * `file` {string|Buffer|number} filename or file descriptor
* `data` {string | Buffer} * `data` {string|Buffer}
* `options` {Object | String} * `options` {Object|string}
* `encoding` {string | Null} default = `'utf8'` * `encoding` {string|null} default = `'utf8'`
* `mode` {Integer} default = `0o666` * `mode` {integer} default = `0o666`
* `flag` {string} default = `'a'` * `flag` {string} default = `'a'`
* `callback` {Function} * `callback` {Function}
@ -504,11 +504,11 @@ changes:
description: The `file` parameter can be a file descriptor now. description: The `file` parameter can be a file descriptor now.
--> -->
* `file` {string | Buffer | Number} filename or file descriptor * `file` {string|Buffer|number} filename or file descriptor
* `data` {string | Buffer} * `data` {string|Buffer}
* `options` {Object | String} * `options` {Object|string}
* `encoding` {string | Null} default = `'utf8'` * `encoding` {string|null} default = `'utf8'`
* `mode` {Integer} default = `0o666` * `mode` {integer} default = `0o666`
* `flag` {string} default = `'a'` * `flag` {string} default = `'a'`
The synchronous version of [`fs.appendFile()`][]. Returns `undefined`. The synchronous version of [`fs.appendFile()`][]. Returns `undefined`.
@ -523,8 +523,8 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `mode` {Integer} * `mode` {integer}
* `callback` {Function} * `callback` {Function}
Asynchronous chmod(2). No arguments other than a possible exception are given Asynchronous chmod(2). No arguments other than a possible exception are given
@ -535,8 +535,8 @@ to the completion callback.
added: v0.6.7 added: v0.6.7
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `mode` {Integer} * `mode` {integer}
Synchronous chmod(2). Returns `undefined`. Synchronous chmod(2). Returns `undefined`.
@ -550,9 +550,9 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `uid` {Integer} * `uid` {integer}
* `gid` {Integer} * `gid` {integer}
* `callback` {Function} * `callback` {Function}
Asynchronous chown(2). No arguments other than a possible exception are given Asynchronous chown(2). No arguments other than a possible exception are given
@ -563,9 +563,9 @@ to the completion callback.
added: v0.1.97 added: v0.1.97
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `uid` {Integer} * `uid` {integer}
* `gid` {Integer} * `gid` {integer}
Synchronous chown(2). Returns `undefined`. Synchronous chown(2). Returns `undefined`.
@ -579,7 +579,7 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `fd` {Integer} * `fd` {integer}
* `callback` {Function} * `callback` {Function}
Asynchronous close(2). No arguments other than a possible exception are given Asynchronous close(2). No arguments other than a possible exception are given
@ -590,7 +590,7 @@ to the completion callback.
added: v0.1.21 added: v0.1.21
--> -->
* `fd` {Integer} * `fd` {integer}
Synchronous close(2). Returns `undefined`. Synchronous close(2). Returns `undefined`.
@ -612,15 +612,15 @@ changes:
description: The passed `options` object can be a string now. description: The passed `options` object can be a string now.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `options` {string | Object} * `options` {string|Object}
* `flags` {string} * `flags` {string}
* `encoding` {string} * `encoding` {string}
* `fd` {Integer} * `fd` {integer}
* `mode` {Integer} * `mode` {integer}
* `autoClose` {boolean} * `autoClose` {boolean}
* `start` {Integer} * `start` {integer}
* `end` {Integer} * `end` {integer}
Returns a new [`ReadStream`][] object. (See [Readable Stream][]). Returns a new [`ReadStream`][] object. (See [Readable Stream][]).
@ -683,14 +683,14 @@ changes:
description: The passed `options` object can be a string now. description: The passed `options` object can be a string now.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `options` {string | Object} * `options` {string|Object}
* `flags` {string} * `flags` {string}
* `defaultEncoding` {string} * `defaultEncoding` {string}
* `fd` {Integer} * `fd` {integer}
* `mode` {Integer} * `mode` {integer}
* `autoClose` {boolean} * `autoClose` {boolean}
* `start` {Integer} * `start` {integer}
Returns a new [`WriteStream`][] object. (See [Writable Stream][]). Returns a new [`WriteStream`][] object. (See [Writable Stream][]).
@ -733,7 +733,7 @@ deprecated: v1.0.0
> Stability: 0 - Deprecated: Use [`fs.stat()`][] or [`fs.access()`][] instead. > Stability: 0 - Deprecated: Use [`fs.stat()`][] or [`fs.access()`][] instead.
* `path` {string | Buffer} * `path` {string|Buffer}
* `callback` {Function} * `callback` {Function}
Test whether or not the given path exists by checking with the file system. Test whether or not the given path exists by checking with the file system.
@ -834,7 +834,7 @@ process.
added: v0.1.21 added: v0.1.21
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
Synchronous version of [`fs.exists()`][]. Synchronous version of [`fs.exists()`][].
Returns `true` if the file exists, `false` otherwise. Returns `true` if the file exists, `false` otherwise.
@ -854,8 +854,8 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `fd` {Integer} * `fd` {integer}
* `mode` {Integer} * `mode` {integer}
* `callback` {Function} * `callback` {Function}
Asynchronous fchmod(2). No arguments other than a possible exception Asynchronous fchmod(2). No arguments other than a possible exception
@ -866,8 +866,8 @@ are given to the completion callback.
added: v0.4.7 added: v0.4.7
--> -->
* `fd` {Integer} * `fd` {integer}
* `mode` {Integer} * `mode` {integer}
Synchronous fchmod(2). Returns `undefined`. Synchronous fchmod(2). Returns `undefined`.
@ -881,9 +881,9 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `fd` {Integer} * `fd` {integer}
* `uid` {Integer} * `uid` {integer}
* `gid` {Integer} * `gid` {integer}
* `callback` {Function} * `callback` {Function}
Asynchronous fchown(2). No arguments other than a possible exception are given Asynchronous fchown(2). No arguments other than a possible exception are given
@ -894,9 +894,9 @@ to the completion callback.
added: v0.4.7 added: v0.4.7
--> -->
* `fd` {Integer} * `fd` {integer}
* `uid` {Integer} * `uid` {integer}
* `gid` {Integer} * `gid` {integer}
Synchronous fchown(2). Returns `undefined`. Synchronous fchown(2). Returns `undefined`.
@ -910,7 +910,7 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `fd` {Integer} * `fd` {integer}
* `callback` {Function} * `callback` {Function}
Asynchronous fdatasync(2). No arguments other than a possible exception are Asynchronous fdatasync(2). No arguments other than a possible exception are
@ -921,7 +921,7 @@ given to the completion callback.
added: v0.1.96 added: v0.1.96
--> -->
* `fd` {Integer} * `fd` {integer}
Synchronous fdatasync(2). Returns `undefined`. Synchronous fdatasync(2). Returns `undefined`.
@ -935,7 +935,7 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `fd` {Integer} * `fd` {integer}
* `callback` {Function} * `callback` {Function}
Asynchronous fstat(2). The callback gets two arguments `(err, stats)` where Asynchronous fstat(2). The callback gets two arguments `(err, stats)` where
@ -947,7 +947,7 @@ except that the file to be stat-ed is specified by the file descriptor `fd`.
added: v0.1.95 added: v0.1.95
--> -->
* `fd` {Integer} * `fd` {integer}
Synchronous fstat(2). Returns an instance of [`fs.Stats`][]. Synchronous fstat(2). Returns an instance of [`fs.Stats`][].
@ -961,7 +961,7 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `fd` {Integer} * `fd` {integer}
* `callback` {Function} * `callback` {Function}
Asynchronous fsync(2). No arguments other than a possible exception are given Asynchronous fsync(2). No arguments other than a possible exception are given
@ -972,7 +972,7 @@ to the completion callback.
added: v0.1.96 added: v0.1.96
--> -->
* `fd` {Integer} * `fd` {integer}
Synchronous fsync(2). Returns `undefined`. Synchronous fsync(2). Returns `undefined`.
@ -986,8 +986,8 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `fd` {Integer} * `fd` {integer}
* `len` {Integer} default = `0` * `len` {integer} default = `0`
* `callback` {Function} * `callback` {Function}
Asynchronous ftruncate(2). No arguments other than a possible exception are Asynchronous ftruncate(2). No arguments other than a possible exception are
@ -1039,8 +1039,8 @@ The last three bytes are null bytes ('\0'), to compensate the over-truncation.
added: v0.8.6 added: v0.8.6
--> -->
* `fd` {Integer} * `fd` {integer}
* `len` {Integer} default = `0` * `len` {integer} default = `0`
Synchronous ftruncate(2). Returns `undefined`. Synchronous ftruncate(2). Returns `undefined`.
@ -1058,9 +1058,9 @@ changes:
time specifiers. time specifiers.
--> -->
* `fd` {Integer} * `fd` {integer}
* `atime` {Integer} * `atime` {integer}
* `mtime` {Integer} * `mtime` {integer}
* `callback` {Function} * `callback` {Function}
Change the file timestamps of a file referenced by the supplied file Change the file timestamps of a file referenced by the supplied file
@ -1076,9 +1076,9 @@ changes:
time specifiers. time specifiers.
--> -->
* `fd` {Integer} * `fd` {integer}
* `atime` {Integer} * `atime` {integer}
* `mtime` {Integer} * `mtime` {integer}
Synchronous version of [`fs.futimes()`][]. Returns `undefined`. Synchronous version of [`fs.futimes()`][]. Returns `undefined`.
@ -1092,8 +1092,8 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `mode` {Integer} * `mode` {integer}
* `callback` {Function} * `callback` {Function}
Asynchronous lchmod(2). No arguments other than a possible exception Asynchronous lchmod(2). No arguments other than a possible exception
@ -1106,8 +1106,8 @@ Only available on Mac OS X.
deprecated: v0.4.7 deprecated: v0.4.7
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `mode` {Integer} * `mode` {integer}
Synchronous lchmod(2). Returns `undefined`. Synchronous lchmod(2). Returns `undefined`.
@ -1121,9 +1121,9 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `uid` {Integer} * `uid` {integer}
* `gid` {Integer} * `gid` {integer}
* `callback` {Function} * `callback` {Function}
Asynchronous lchown(2). No arguments other than a possible exception are given Asynchronous lchown(2). No arguments other than a possible exception are given
@ -1134,9 +1134,9 @@ to the completion callback.
deprecated: v0.4.7 deprecated: v0.4.7
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `uid` {Integer} * `uid` {integer}
* `gid` {Integer} * `gid` {integer}
Synchronous lchown(2). Returns `undefined`. Synchronous lchown(2). Returns `undefined`.
@ -1150,8 +1150,8 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `existingPath` {string | Buffer} * `existingPath` {string|Buffer}
* `newPath` {string | Buffer} * `newPath` {string|Buffer}
* `callback` {Function} * `callback` {Function}
Asynchronous link(2). No arguments other than a possible exception are given to Asynchronous link(2). No arguments other than a possible exception are given to
@ -1162,8 +1162,8 @@ the completion callback.
added: v0.1.31 added: v0.1.31
--> -->
* `existingPath` {string | Buffer} * `existingPath` {string|Buffer}
* `newPath` {string | Buffer} * `newPath` {string|Buffer}
Synchronous link(2). Returns `undefined`. Synchronous link(2). Returns `undefined`.
@ -1177,7 +1177,7 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `callback` {Function} * `callback` {Function}
Asynchronous lstat(2). The callback gets two arguments `(err, stats)` where Asynchronous lstat(2). The callback gets two arguments `(err, stats)` where
@ -1190,7 +1190,7 @@ not the file that it refers to.
added: v0.1.30 added: v0.1.30
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
Synchronous lstat(2). Returns an instance of [`fs.Stats`][]. Synchronous lstat(2). Returns an instance of [`fs.Stats`][].
@ -1204,8 +1204,8 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `mode` {Integer} * `mode` {integer}
* `callback` {Function} * `callback` {Function}
Asynchronous mkdir(2). No arguments other than a possible exception are given Asynchronous mkdir(2). No arguments other than a possible exception are given
@ -1216,8 +1216,8 @@ to the completion callback. `mode` defaults to `0o777`.
added: v0.1.21 added: v0.1.21
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `mode` {Integer} * `mode` {integer}
Synchronous mkdir(2). Returns `undefined`. Synchronous mkdir(2). Returns `undefined`.
@ -1235,7 +1235,7 @@ changes:
--> -->
* `prefix` {string} * `prefix` {string}
* `options` {string | Object} * `options` {string|Object}
* `encoding` {string} default = `'utf8'` * `encoding` {string} default = `'utf8'`
* `callback` {Function} * `callback` {Function}
@ -1297,7 +1297,7 @@ added: v5.10.0
--> -->
* `prefix` {string} * `prefix` {string}
* `options` {string | Object} * `options` {string|Object}
* `encoding` {string} default = `'utf8'` * `encoding` {string} default = `'utf8'`
The synchronous version of [`fs.mkdtemp()`][]. Returns the created The synchronous version of [`fs.mkdtemp()`][]. Returns the created
@ -1311,9 +1311,9 @@ object with an `encoding` property specifying the character encoding to use.
added: v0.0.2 added: v0.0.2
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `flags` {string | Number} * `flags` {string|number}
* `mode` {Integer} * `mode` {integer}
* `callback` {Function} * `callback` {Function}
Asynchronous file open. See open(2). `flags` can be: Asynchronous file open. See open(2). `flags` can be:
@ -1395,9 +1395,9 @@ fs.open('<directory>', 'a+', (err, fd) => {
added: v0.1.21 added: v0.1.21
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `flags` {string | Number} * `flags` {string|number}
* `mode` {Integer} * `mode` {integer}
Synchronous version of [`fs.open()`][]. Returns an integer representing the file Synchronous version of [`fs.open()`][]. Returns an integer representing the file
descriptor. descriptor.
@ -1414,11 +1414,11 @@ changes:
description: The `length` parameter can now be `0`. description: The `length` parameter can now be `0`.
--> -->
* `fd` {Integer} * `fd` {integer}
* `buffer` {string | Buffer | Uint8Array} * `buffer` {string|Buffer|Uint8Array}
* `offset` {Integer} * `offset` {integer}
* `length` {Integer} * `length` {integer}
* `position` {Integer} * `position` {integer}
* `callback` {Function} * `callback` {Function}
Read data from the file specified by `fd`. Read data from the file specified by `fd`.
@ -1444,8 +1444,8 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `options` {string | Object} * `options` {string|Object}
* `encoding` {string} default = `'utf8'` * `encoding` {string} default = `'utf8'`
* `callback` {Function} * `callback` {Function}
@ -1463,8 +1463,8 @@ the filenames returned will be passed as `Buffer` objects.
added: v0.1.21 added: v0.1.21
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `options` {string | Object} * `options` {string|Object}
* `encoding` {string} default = `'utf8'` * `encoding` {string} default = `'utf8'`
Synchronous readdir(3). Returns an array of filenames excluding `'.'` and Synchronous readdir(3). Returns an array of filenames excluding `'.'` and
@ -1492,9 +1492,9 @@ changes:
description: The `file` parameter can be a file descriptor now. description: The `file` parameter can be a file descriptor now.
--> -->
* `file` {string | Buffer | Integer} filename or file descriptor * `file` {string|Buffer|integer} filename or file descriptor
* `options` {Object | String} * `options` {Object|string}
* `encoding` {string | Null} default = `null` * `encoding` {string|null} default = `null`
* `flag` {string} default = `'r'` * `flag` {string} default = `'r'`
* `callback` {Function} * `callback` {Function}
@ -1532,9 +1532,9 @@ changes:
description: The `file` parameter can be a file descriptor now. description: The `file` parameter can be a file descriptor now.
--> -->
* `file` {string | Buffer | Integer} filename or file descriptor * `file` {string|Buffer|integer} filename or file descriptor
* `options` {Object | String} * `options` {Object|string}
* `encoding` {string | Null} default = `null` * `encoding` {string|null} default = `null`
* `flag` {string} default = `'r'` * `flag` {string} default = `'r'`
Synchronous version of [`fs.readFile`][]. Returns the contents of the `file`. Synchronous version of [`fs.readFile`][]. Returns the contents of the `file`.
@ -1552,8 +1552,8 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `options` {string | Object} * `options` {string|Object}
* `encoding` {string} default = `'utf8'` * `encoding` {string} default = `'utf8'`
* `callback` {Function} * `callback` {Function}
@ -1570,8 +1570,8 @@ the link path returned will be passed as a `Buffer` object.
added: v0.1.31 added: v0.1.31
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `options` {string | Object} * `options` {string|Object}
* `encoding` {string} default = `'utf8'` * `encoding` {string} default = `'utf8'`
Synchronous readlink(2). Returns the symbolic link's string value. Synchronous readlink(2). Returns the symbolic link's string value.
@ -1590,11 +1590,11 @@ changes:
description: The `length` parameter can now be `0`. description: The `length` parameter can now be `0`.
--> -->
* `fd` {Integer} * `fd` {integer}
* `buffer` {string | Buffer | Uint8Array} * `buffer` {string|Buffer|Uint8Array}
* `offset` {Integer} * `offset` {integer}
* `length` {Integer} * `length` {integer}
* `position` {Integer} * `position` {integer}
Synchronous version of [`fs.read()`][]. Returns the number of `bytesRead`. Synchronous version of [`fs.read()`][]. Returns the number of `bytesRead`.
@ -1615,8 +1615,8 @@ changes:
description: The `cache` parameter was removed. description: The `cache` parameter was removed.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `options` {string | Object} * `options` {string|Object}
* `encoding` {string} default = `'utf8'` * `encoding` {string} default = `'utf8'`
* `callback` {Function} * `callback` {Function}
@ -1643,8 +1643,8 @@ changes:
description: The `cache` parameter was removed. description: The `cache` parameter was removed.
--> -->
* `path` {string | Buffer}; * `path` {string|Buffer};
* `options` {string | Object} * `options` {string|Object}
* `encoding` {string} default = `'utf8'` * `encoding` {string} default = `'utf8'`
Synchronous realpath(3). Returns the resolved path. Synchronous realpath(3). Returns the resolved path.
@ -1666,8 +1666,8 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `oldPath` {string | Buffer} * `oldPath` {string|Buffer}
* `newPath` {string | Buffer} * `newPath` {string|Buffer}
* `callback` {Function} * `callback` {Function}
Asynchronous rename(2). No arguments other than a possible exception are given Asynchronous rename(2). No arguments other than a possible exception are given
@ -1678,8 +1678,8 @@ to the completion callback.
added: v0.1.21 added: v0.1.21
--> -->
* `oldPath` {string | Buffer} * `oldPath` {string|Buffer}
* `newPath` {string | Buffer} * `newPath` {string|Buffer}
Synchronous rename(2). Returns `undefined`. Synchronous rename(2). Returns `undefined`.
@ -1693,7 +1693,7 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `callback` {Function} * `callback` {Function}
Asynchronous rmdir(2). No arguments other than a possible exception are given Asynchronous rmdir(2). No arguments other than a possible exception are given
@ -1704,7 +1704,7 @@ to the completion callback.
added: v0.1.21 added: v0.1.21
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
Synchronous rmdir(2). Returns `undefined`. Synchronous rmdir(2). Returns `undefined`.
@ -1718,7 +1718,7 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `callback` {Function} * `callback` {Function}
Asynchronous stat(2). The callback gets two arguments `(err, stats)` where Asynchronous stat(2). The callback gets two arguments `(err, stats)` where
@ -1739,7 +1739,7 @@ is recommended.
added: v0.1.21 added: v0.1.21
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
Synchronous stat(2). Returns an instance of [`fs.Stats`][]. Synchronous stat(2). Returns an instance of [`fs.Stats`][].
@ -1748,8 +1748,8 @@ Synchronous stat(2). Returns an instance of [`fs.Stats`][].
added: v0.1.31 added: v0.1.31
--> -->
* `target` {string | Buffer} * `target` {string|Buffer}
* `path` {string | Buffer} * `path` {string|Buffer}
* `type` {string} * `type` {string}
* `callback` {Function} * `callback` {Function}
@ -1773,8 +1773,8 @@ It creates a symbolic link named "new-port" that points to "foo".
added: v0.1.31 added: v0.1.31
--> -->
* `target` {string | Buffer} * `target` {string|Buffer}
* `path` {string | Buffer} * `path` {string|Buffer}
* `type` {string} * `type` {string}
Synchronous symlink(2). Returns `undefined`. Synchronous symlink(2). Returns `undefined`.
@ -1789,8 +1789,8 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `len` {Integer} default = `0` * `len` {integer} default = `0`
* `callback` {Function} * `callback` {Function}
Asynchronous truncate(2). No arguments other than a possible exception are Asynchronous truncate(2). No arguments other than a possible exception are
@ -1802,8 +1802,8 @@ first argument. In this case, `fs.ftruncate()` is called.
added: v0.8.6 added: v0.8.6
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `len` {Integer} default = `0` * `len` {integer} default = `0`
Synchronous truncate(2). Returns `undefined`. A file descriptor can also be Synchronous truncate(2). Returns `undefined`. A file descriptor can also be
passed as the first argument. In this case, `fs.ftruncateSync()` is called. passed as the first argument. In this case, `fs.ftruncateSync()` is called.
@ -1818,7 +1818,7 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `callback` {Function} * `callback` {Function}
Asynchronous unlink(2). No arguments other than a possible exception are given Asynchronous unlink(2). No arguments other than a possible exception are given
@ -1829,7 +1829,7 @@ to the completion callback.
added: v0.1.21 added: v0.1.21
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
Synchronous unlink(2). Returns `undefined`. Synchronous unlink(2). Returns `undefined`.
@ -1838,7 +1838,7 @@ Synchronous unlink(2). Returns `undefined`.
added: v0.1.31 added: v0.1.31
--> -->
* `filename` {string | Buffer} * `filename` {string|Buffer}
* `listener` {Function} * `listener` {Function}
Stop watching for changes on `filename`. If `listener` is specified, only that Stop watching for changes on `filename`. If `listener` is specified, only that
@ -1866,9 +1866,9 @@ changes:
time specifiers. time specifiers.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `atime` {Integer} * `atime` {integer}
* `mtime` {Integer} * `mtime` {integer}
* `callback` {Function} * `callback` {Function}
Change file timestamps of the file referenced by the supplied path. Change file timestamps of the file referenced by the supplied path.
@ -1893,9 +1893,9 @@ changes:
time specifiers. time specifiers.
--> -->
* `path` {string | Buffer} * `path` {string|Buffer}
* `atime` {Integer} * `atime` {integer}
* `mtime` {Integer} * `mtime` {integer}
Synchronous version of [`fs.utimes()`][]. Returns `undefined`. Synchronous version of [`fs.utimes()`][]. Returns `undefined`.
@ -1908,8 +1908,8 @@ changes:
description: The passed `options` object will never be modified. description: The passed `options` object will never be modified.
--> -->
* `filename` {string | Buffer} * `filename` {string|Buffer}
* `options` {string | Object} * `options` {string|Object}
* `persistent` {boolean} Indicates whether the process should continue to run * `persistent` {boolean} Indicates whether the process should continue to run
as long as files are being watched. default = `true` as long as files are being watched. default = `true`
* `recursive` {boolean} Indicates whether all subdirectories should be * `recursive` {boolean} Indicates whether all subdirectories should be
@ -2011,10 +2011,10 @@ fs.watch('somedir', (eventType, filename) => {
added: v0.1.31 added: v0.1.31
--> -->
* `filename` {string | Buffer} * `filename` {string|Buffer}
* `options` {Object} * `options` {Object}
* `persistent` {boolean} * `persistent` {boolean}
* `interval` {Integer} * `interval` {integer}
* `listener` {Function} * `listener` {Function}
Watch for changes on `filename`. The callback `listener` will be called each Watch for changes on `filename`. The callback `listener` will be called each
@ -2068,11 +2068,11 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `fd` {Integer} * `fd` {integer}
* `buffer` {Buffer | Uint8Array} * `buffer` {Buffer|Uint8Array}
* `offset` {Integer} * `offset` {integer}
* `length` {Integer} * `length` {integer}
* `position` {Integer} * `position` {integer}
* `callback` {Function} * `callback` {Function}
Write `buffer` to the file specified by `fd`. Write `buffer` to the file specified by `fd`.
@ -2108,9 +2108,9 @@ changes:
it will emit a deprecation warning. it will emit a deprecation warning.
--> -->
* `fd` {Integer} * `fd` {integer}
* `string` {string} * `string` {string}
* `position` {Integer} * `position` {integer}
* `encoding` {string} * `encoding` {string}
* `callback` {Function} * `callback` {Function}
@ -2155,11 +2155,11 @@ changes:
description: The `file` parameter can be a file descriptor now. description: The `file` parameter can be a file descriptor now.
--> -->
* `file` {string | Buffer | Integer} filename or file descriptor * `file` {string|Buffer|integer} filename or file descriptor
* `data` {string | Buffer | Uint8Array} * `data` {string|Buffer|Uint8Array}
* `options` {Object | String} * `options` {Object|string}
* `encoding` {string | Null} default = `'utf8'` * `encoding` {string|null} default = `'utf8'`
* `mode` {Integer} default = `0o666` * `mode` {integer} default = `0o666`
* `flag` {string} default = `'w'` * `flag` {string} default = `'w'`
* `callback` {Function} * `callback` {Function}
@ -2205,11 +2205,11 @@ changes:
description: The `file` parameter can be a file descriptor now. description: The `file` parameter can be a file descriptor now.
--> -->
* `file` {string | Buffer | Integer} filename or file descriptor * `file` {string|Buffer|integer} filename or file descriptor
* `data` {string | Buffer | Uint8Array} * `data` {string|Buffer|Uint8Array}
* `options` {Object | String} * `options` {Object|string}
* `encoding` {string | Null} default = `'utf8'` * `encoding` {string|null} default = `'utf8'`
* `mode` {Integer} default = `0o666` * `mode` {integer} default = `0o666`
* `flag` {string} default = `'w'` * `flag` {string} default = `'w'`
The synchronous version of [`fs.writeFile()`][]. Returns `undefined`. The synchronous version of [`fs.writeFile()`][]. Returns `undefined`.
@ -2226,11 +2226,11 @@ changes:
description: The `offset` and `length` parameters are optional now. description: The `offset` and `length` parameters are optional now.
--> -->
* `fd` {Integer} * `fd` {integer}
* `buffer` {Buffer | Uint8Array} * `buffer` {Buffer|Uint8Array}
* `offset` {Integer} * `offset` {integer}
* `length` {Integer} * `length` {integer}
* `position` {Integer} * `position` {integer}
## fs.writeSync(fd, string[, position[, encoding]]) ## fs.writeSync(fd, string[, position[, encoding]])
<!-- YAML <!-- YAML
@ -2241,9 +2241,9 @@ changes:
description: The `position` parameter is optional now. description: The `position` parameter is optional now.
--> -->
* `fd` {Integer} * `fd` {integer}
* `string` {string} * `string` {string}
* `position` {Integer} * `position` {integer}
* `encoding` {string} * `encoding` {string}
Synchronous versions of [`fs.write()`][]. Returns the number of bytes written. Synchronous versions of [`fs.write()`][]. Returns the number of bytes written.

4
doc/api/globals.md

@ -27,7 +27,7 @@ added: v0.1.27
<!-- type=var --> <!-- type=var -->
* {String} * {string}
The directory name of the current module. This the same as the The directory name of the current module. This the same as the
[`path.dirname()`][] of the [`__filename`][]. [`path.dirname()`][] of the [`__filename`][].
@ -50,7 +50,7 @@ added: v0.0.1
<!-- type=var --> <!-- type=var -->
* {String} * {string}
The file name of the current module. This is the resolved absolute path of the The file name of the current module. This is the resolved absolute path of the
current module file. current module file.

8
doc/api/http.md

@ -463,7 +463,7 @@ aborted, in milliseconds since 1 January 1970 00:00:00 UTC.
added: v0.1.90 added: v0.1.90
--> -->
* `data` {string | Buffer} * `data` {string|Buffer}
* `encoding` {string} * `encoding` {string}
* `callback` {Function} * `callback` {Function}
@ -531,7 +531,7 @@ Returns `request`.
added: v0.1.29 added: v0.1.29
--> -->
* `chunk` {string | Buffer} * `chunk` {string|Buffer}
* `encoding` {string} * `encoding` {string}
* `callback` {Function} * `callback` {Function}
@ -906,7 +906,7 @@ will result in a [`TypeError`][] being thrown.
added: v0.1.90 added: v0.1.90
--> -->
* `data` {string | Buffer} * `data` {string|Buffer}
* `encoding` {string} * `encoding` {string}
* `callback` {Function} * `callback` {Function}
@ -1150,7 +1150,7 @@ status message which was sent out.
added: v0.1.29 added: v0.1.29
--> -->
* `chunk` {string | Buffer} * `chunk` {string|Buffer}
* `encoding` {string} * `encoding` {string}
* `callback` {Function} * `callback` {Function}
* Returns: {boolean} * Returns: {boolean}

6
doc/api/modules.md

@ -580,7 +580,7 @@ function require(...) {
added: v0.1.16 added: v0.1.16
--> -->
* {String} * {string}
The fully resolved filename to the module. The fully resolved filename to the module.
@ -589,7 +589,7 @@ The fully resolved filename to the module.
added: v0.1.16 added: v0.1.16
--> -->
* {String} * {string}
The identifier for the module. Typically this is the fully resolved The identifier for the module. Typically this is the fully resolved
filename. filename.
@ -599,7 +599,7 @@ filename.
added: v0.1.16 added: v0.1.16
--> -->
* {Boolean} * {boolean}
Whether or not the module is done loading, or is in the process of Whether or not the module is done loading, or is in the process of
loading. loading.

2
doc/api/net.md

@ -235,7 +235,7 @@ server.listen({
added: v0.1.90 added: v0.1.90
--> -->
* `path` {String} * `path` {string}
* `backlog` {number} Common parameter of [`server.listen()`][] functions * `backlog` {number} Common parameter of [`server.listen()`][] functions
* `callback` {Function} Common parameter of [`server.listen()`][] functions * `callback` {Function} Common parameter of [`server.listen()`][] functions

24
doc/api/os.md

@ -14,7 +14,7 @@ const os = require('os');
added: v0.7.8 added: v0.7.8
--> -->
* {String} * {string}
A string constant defining the operating system-specific end-of-line marker: A string constant defining the operating system-specific end-of-line marker:
@ -26,7 +26,7 @@ A string constant defining the operating system-specific end-of-line marker:
added: v0.5.0 added: v0.5.0
--> -->
* Returns: {String} * Returns: {string}
The `os.arch()` method returns a string identifying the operating system CPU The `os.arch()` method returns a string identifying the operating system CPU
architecture *for which the Node.js binary was compiled*. architecture *for which the Node.js binary was compiled*.
@ -172,7 +172,7 @@ all processors are always 0.
added: v0.9.4 added: v0.9.4
--> -->
* Returns: {String} * Returns: {string}
The `os.endianness()` method returns a string identifying the endianness of the The `os.endianness()` method returns a string identifying the endianness of the
CPU *for which the Node.js binary was compiled*. CPU *for which the Node.js binary was compiled*.
@ -187,7 +187,7 @@ Possible values are:
added: v0.3.3 added: v0.3.3
--> -->
* Returns: {Integer} * Returns: {integer}
The `os.freemem()` method returns the amount of free system memory in bytes as The `os.freemem()` method returns the amount of free system memory in bytes as
an integer. an integer.
@ -197,7 +197,7 @@ an integer.
added: v2.3.0 added: v2.3.0
--> -->
* Returns: {String} * Returns: {string}
The `os.homedir()` method returns the home directory of the current user as a The `os.homedir()` method returns the home directory of the current user as a
string. string.
@ -207,7 +207,7 @@ string.
added: v0.3.3 added: v0.3.3
--> -->
* Returns: {String} * Returns: {string}
The `os.hostname()` method returns the hostname of the operating system as a The `os.hostname()` method returns the hostname of the operating system as a
string. string.
@ -295,7 +295,7 @@ The properties available on the assigned network address object include:
added: v0.5.0 added: v0.5.0
--> -->
* Returns: {String} * Returns: {string}
The `os.platform()` method returns a string identifying the operating system The `os.platform()` method returns a string identifying the operating system
platform as set during compile time of Node.js. platform as set during compile time of Node.js.
@ -321,7 +321,7 @@ to be experimental at this time.
added: v0.3.3 added: v0.3.3
--> -->
* Returns: {String} * Returns: {string}
The `os.release()` method returns a string identifying the operating system The `os.release()` method returns a string identifying the operating system
release. release.
@ -340,7 +340,7 @@ changes:
returns a path with a trailing slash on any platform returns a path with a trailing slash on any platform
--> -->
* Returns: {String} * Returns: {string}
The `os.tmpdir()` method returns a string specifying the operating system's The `os.tmpdir()` method returns a string specifying the operating system's
default directory for temporary files. default directory for temporary files.
@ -350,7 +350,7 @@ default directory for temporary files.
added: v0.3.3 added: v0.3.3
--> -->
* Returns: {Integer} * Returns: {integer}
The `os.totalmem()` method returns the total amount of system memory in bytes The `os.totalmem()` method returns the total amount of system memory in bytes
as an integer. as an integer.
@ -360,7 +360,7 @@ as an integer.
added: v0.3.3 added: v0.3.3
--> -->
* Returns: {String} * Returns: {string}
The `os.type()` method returns a string identifying the operating system name The `os.type()` method returns a string identifying the operating system name
as returned by uname(3). For example `'Linux'` on Linux, `'Darwin'` on OS X and as returned by uname(3). For example `'Linux'` on Linux, `'Darwin'` on OS X and
@ -374,7 +374,7 @@ information about the output of running uname(3) on various operating systems.
added: v0.3.3 added: v0.3.3
--> -->
* Returns: {Integer} * Returns: {integer}
The `os.uptime()` method returns the system uptime in number of seconds. The `os.uptime()` method returns the system uptime in number of seconds.

22
doc/api/path.md

@ -65,7 +65,7 @@ changes:
* `path` {string} * `path` {string}
* `ext` {string} An optional file extension * `ext` {string} An optional file extension
* Returns: {String} * Returns: {string}
The `path.basename()` methods returns the last portion of a `path`, similar to The `path.basename()` methods returns the last portion of a `path`, similar to
the Unix `basename` command. the Unix `basename` command.
@ -88,7 +88,7 @@ and is not a string.
added: v0.9.3 added: v0.9.3
--> -->
* {String} * {string}
Provides the platform-specific path delimiter: Provides the platform-specific path delimiter:
@ -125,7 +125,7 @@ changes:
--> -->
* `path` {string} * `path` {string}
* Returns: {String} * Returns: {string}
The `path.dirname()` method returns the directory name of a `path`, similar to The `path.dirname()` method returns the directory name of a `path`, similar to
the Unix `dirname` command. the Unix `dirname` command.
@ -149,7 +149,7 @@ changes:
--> -->
* `path` {string} * `path` {string}
* Returns: {String} * Returns: {string}
The `path.extname()` method returns the extension of the `path`, from the last The `path.extname()` method returns the extension of the `path`, from the last
occurrence of the `.` (period) character to end of string in the last portion of occurrence of the `.` (period) character to end of string in the last portion of
@ -189,7 +189,7 @@ added: v0.11.15
* `base` {string} * `base` {string}
* `name` {string} * `name` {string}
* `ext` {string} * `ext` {string}
* Returns: {String} * Returns: {string}
The `path.format()` method returns a path string from an object. This is the The `path.format()` method returns a path string from an object. This is the
opposite of [`path.parse()`][]. opposite of [`path.parse()`][].
@ -248,7 +248,7 @@ added: v0.11.2
--> -->
* `path` {string} * `path` {string}
* Returns: {Boolean} * Returns: {boolean}
The `path.isAbsolute()` method determines if `path` is an absolute path. The `path.isAbsolute()` method determines if `path` is an absolute path.
@ -283,7 +283,7 @@ added: v0.1.16
--> -->
* `...paths` {string} A sequence of path segments * `...paths` {string} A sequence of path segments
* Returns: {String} * Returns: {string}
The `path.join()` method joins all given `path` segments together using the The `path.join()` method joins all given `path` segments together using the
platform specific separator as a delimiter, then normalizes the resulting path. platform specific separator as a delimiter, then normalizes the resulting path.
@ -310,7 +310,7 @@ added: v0.1.23
--> -->
* `path` {string} * `path` {string}
* Returns: {String} * Returns: {string}
The `path.normalize()` method normalizes the given `path`, resolving `'..'` and The `path.normalize()` method normalizes the given `path`, resolving `'..'` and
`'.'` segments. `'.'` segments.
@ -429,7 +429,7 @@ changes:
* `from` {string} * `from` {string}
* `to` {string} * `to` {string}
* Returns: {String} * Returns: {string}
The `path.relative()` method returns the relative path from `from` to `to`. The `path.relative()` method returns the relative path from `from` to `to`.
If `from` and `to` each resolve to the same path (after calling `path.resolve()` If `from` and `to` each resolve to the same path (after calling `path.resolve()`
@ -460,7 +460,7 @@ added: v0.3.4
--> -->
* `...paths` {string} A sequence of paths or path segments * `...paths` {string} A sequence of paths or path segments
* Returns: {String} * Returns: {string}
The `path.resolve()` method resolves a sequence of paths or path segments into The `path.resolve()` method resolves a sequence of paths or path segments into
an absolute path. an absolute path.
@ -502,7 +502,7 @@ A [`TypeError`][] is thrown if any of the arguments is not a string.
added: v0.7.9 added: v0.7.9
--> -->
* {String} * {string}
Provides the platform-specific path segment separator: Provides the platform-specific path segment separator:

44
doc/api/process.md

@ -416,7 +416,7 @@ generate a core file.
added: v0.5.0 added: v0.5.0
--> -->
* {String} * {string}
The `process.arch` property returns a String identifying the processor The `process.arch` property returns a String identifying the processor
architecture that the Node.js process is currently running on. For instance architecture that the Node.js process is currently running on. For instance
@ -470,7 +470,7 @@ Would generate the output:
added: 6.4.0 added: 6.4.0
--> -->
* {String} * {string}
The `process.argv0` property stores a read-only copy of the original value of The `process.argv0` property stores a read-only copy of the original value of
`argv[0]` passed when Node.js starts. `argv[0]` passed when Node.js starts.
@ -565,7 +565,7 @@ replace the value of `process.config`.
added: v0.7.2 added: v0.7.2
--> -->
* {Boolean} * {boolean}
If the Node.js process is spawned with an IPC channel (see the [Child Process][] If the Node.js process is spawned with an IPC channel (see the [Child Process][]
and [Cluster][] documentation), the `process.connected` property will return and [Cluster][] documentation), the `process.connected` property will return
@ -583,8 +583,8 @@ added: v6.1.0
* `previousValue` {Object} A previous return value from calling * `previousValue` {Object} A previous return value from calling
`process.cpuUsage()` `process.cpuUsage()`
* Returns: {Object} * Returns: {Object}
* `user` {Integer} * `user` {integer}
* `system` {Integer} * `system` {integer}
The `process.cpuUsage()` method returns the user and system CPU time usage of The `process.cpuUsage()` method returns the user and system CPU time usage of
the current process, in an object with properties `user` and `system`, whose the current process, in an object with properties `user` and `system`, whose
@ -612,7 +612,7 @@ console.log(process.cpuUsage(startUsage));
added: v0.1.8 added: v0.1.8
--> -->
* Returns: {String} * Returns: {string}
The `process.cwd()` method returns the current working directory of the Node.js The `process.cwd()` method returns the current working directory of the Node.js
process. process.
@ -642,7 +642,7 @@ If the Node.js process was not spawned with an IPC channel,
added: v6.0.0 added: v6.0.0
--> -->
* `warning` {string | Error} The warning to emit. * `warning` {string|Error} The warning to emit.
* `type` {string} When `warning` is a String, `type` is the name to use * `type` {string} When `warning` is a String, `type` is the name to use
for the *type* of warning being emitted. Default: `Warning`. for the *type* of warning being emitted. Default: `Warning`.
* `code` {string} A unique identifier for the warning instance being emitted. * `code` {string} A unique identifier for the warning instance being emitted.
@ -848,7 +848,7 @@ And `process.argv`:
added: v0.1.100 added: v0.1.100
--> -->
* {String} * {string}
The `process.execPath` property returns the absolute pathname of the executable The `process.execPath` property returns the absolute pathname of the executable
that started the Node.js process. that started the Node.js process.
@ -865,7 +865,7 @@ For example:
added: v0.1.13 added: v0.1.13
--> -->
* `code` {Integer} The exit code. Defaults to `0`. * `code` {integer} The exit code. Defaults to `0`.
The `process.exit()` method instructs Node.js to terminate the process The `process.exit()` method instructs Node.js to terminate the process
synchronously with an exit status of `code`. If `code` is omitted, exit uses synchronously with an exit status of `code`. If `code` is omitted, exit uses
@ -930,7 +930,7 @@ is safer than calling `process.exit()`.
added: v0.11.8 added: v0.11.8
--> -->
* {Integer} * {integer}
A number which will be the process exit code, when the process either A number which will be the process exit code, when the process either
exits gracefully, or is exited via [`process.exit()`][] without specifying exits gracefully, or is exited via [`process.exit()`][] without specifying
@ -1015,7 +1015,7 @@ Android)
added: v0.1.28 added: v0.1.28
--> -->
* Returns: {Integer} * Returns: {integer}
The `process.getuid()` method returns the numeric user identity of the process. The `process.getuid()` method returns the numeric user identity of the process.
(See getuid(2).) (See getuid(2).)
@ -1158,10 +1158,10 @@ changes:
--> -->
* Returns: {Object} * Returns: {Object}
* `rss` {Integer} * `rss` {integer}
* `heapTotal` {Integer} * `heapTotal` {integer}
* `heapUsed` {Integer} * `heapUsed` {integer}
* `external` {Integer} * `external` {integer}
The `process.memoryUsage()` method returns an object describing the memory usage The `process.memoryUsage()` method returns an object describing the memory usage
of the Node.js process measured in bytes. of the Node.js process measured in bytes.
@ -1287,7 +1287,7 @@ happening, just like a `while(true);` loop.
added: v0.1.15 added: v0.1.15
--> -->
* {Integer} * {integer}
The `process.pid` property returns the PID of the process. The `process.pid` property returns the PID of the process.
@ -1300,7 +1300,7 @@ console.log(`This process is pid ${process.pid}`);
added: v0.1.16 added: v0.1.16
--> -->
* {String} * {string}
The `process.platform` property returns a string identifying the operating The `process.platform` property returns a string identifying the operating
system platform on which the Node.js process is running. For instance system platform on which the Node.js process is running. For instance
@ -1329,7 +1329,7 @@ tarball.
legacy io.js releases, this will be `'io.js'`. legacy io.js releases, this will be `'io.js'`.
* `sourceUrl` {string} an absolute URL pointing to a _`.tar.gz`_ file containing * `sourceUrl` {string} an absolute URL pointing to a _`.tar.gz`_ file containing
the source code of the current release. the source code of the current release.
* `headersUrl`{String} an absolute URL pointing to a _`.tar.gz`_ file containing * `headersUrl`{string} an absolute URL pointing to a _`.tar.gz`_ file containing
only the source header files for the current release. This file is only the source header files for the current release. This file is
significantly smaller than the full source file and can be used for compiling significantly smaller than the full source file and can be used for compiling
Node.js native add-ons. Node.js native add-ons.
@ -1365,7 +1365,7 @@ added: v0.5.9
* `sendHandle` {Handle object} * `sendHandle` {Handle object}
* `options` {Object} * `options` {Object}
* `callback` {Function} * `callback` {Function}
* Returns: {Boolean} * Returns: {boolean}
If Node.js is spawned with an IPC channel, the `process.send()` method can be If Node.js is spawned with an IPC channel, the `process.send()` method can be
used to send messages to the parent process. Messages will be received as a used to send messages to the parent process. Messages will be received as a
@ -1617,7 +1617,7 @@ See the [TTY][] documentation for more information.
added: v0.1.104 added: v0.1.104
--> -->
* {String} * {string}
The `process.title` property returns the current process title (i.e. returns The `process.title` property returns the current process title (i.e. returns
the current value of `ps`). Assigning a new value to `process.title` modifies the current value of `ps`). Assigning a new value to `process.title` modifies
@ -1658,7 +1658,7 @@ console.log(
added: v0.5.0 added: v0.5.0
--> -->
* Returns: {Number} * Returns: {number}
The `process.uptime()` method returns the number of seconds the current Node.js The `process.uptime()` method returns the number of seconds the current Node.js
process has been running. process has been running.
@ -1668,7 +1668,7 @@ process has been running.
added: v0.1.3 added: v0.1.3
--> -->
* {String} * {string}
The `process.version` property returns the Node.js version string. The `process.version` property returns the Node.js version string.

2
doc/api/repl.md

@ -379,7 +379,7 @@ changes:
description: The `options` parameter is optional now. description: The `options` parameter is optional now.
--> -->
* `options` {Object | String} * `options` {Object|string}
* `prompt` {string} The input prompt to display. Defaults to `> ` * `prompt` {string} The input prompt to display. Defaults to `> `
(with a trailing space). (with a trailing space).
* `input` {Readable} The Readable stream from which REPL input will be read. * `input` {Readable} The Readable stream from which REPL input will be read.

8
doc/api/stream.md

@ -443,7 +443,7 @@ changes:
* `chunk` {string|Buffer} The data to write * `chunk` {string|Buffer} The data to write
* `encoding` {string} The encoding, if `chunk` is a String * `encoding` {string} The encoding, if `chunk` is a String
* `callback` {Function} Callback for when this chunk of data is flushed * `callback` {Function} Callback for when this chunk of data is flushed
* Returns: {Boolean} `false` if the stream wishes for the calling code to * Returns: {boolean} `false` if the stream wishes for the calling code to
wait for the `'drain'` event to be emitted before continuing to write wait for the `'drain'` event to be emitted before continuing to write
additional data; otherwise `true`. additional data; otherwise `true`.
@ -741,7 +741,7 @@ preferred over the use of the `'readable'` event.
added: v0.11.14 added: v0.11.14
--> -->
* Returns: {Boolean} * Returns: {boolean}
The `readable.isPaused()` method returns the current operating state of the The `readable.isPaused()` method returns the current operating state of the
Readable. This is used primarily by the mechanism that underlies the Readable. This is used primarily by the mechanism that underlies the
@ -846,7 +846,7 @@ added: v0.9.4
--> -->
* `size` {number} Optional argument to specify how much data to read. * `size` {number} Optional argument to specify how much data to read.
* Return {String|Buffer|null} * Return {string|Buffer|null}
The `readable.read()` method pulls some data out of the internal buffer and The `readable.read()` method pulls some data out of the internal buffer and
returns it. If no data available to be read, `null` is returned. By default, returns it. If no data available to be read, `null` is returned. By default,
@ -1503,7 +1503,7 @@ user programs.
* `chunk` {Buffer|null|string} Chunk of data to push into the read queue * `chunk` {Buffer|null|string} Chunk of data to push into the read queue
* `encoding` {string} Encoding of String chunks. Must be a valid * `encoding` {string} Encoding of String chunks. Must be a valid
Buffer encoding, such as `'utf8'` or `'ascii'` Buffer encoding, such as `'utf8'` or `'ascii'`
* Returns {Boolean} `true` if additional chunks of data may continued to be * Returns {boolean} `true` if additional chunks of data may continued to be
pushed; `false` otherwise. pushed; `false` otherwise.
When `chunk` is a `Buffer` or `string`, the `chunk` of data will be added to the When `chunk` is a `Buffer` or `string`, the `chunk` of data will be added to the

38
doc/api/url.md

@ -136,7 +136,7 @@ forward-slash characters (`/`) are required following the colon in the
added: v0.1.25 added: v0.1.25
--> -->
* `urlObject` {Object | String} A URL object (as returned by `url.parse()` or * `urlObject` {Object|string} A URL object (as returned by `url.parse()` or
constructed otherwise). If a string, it is converted to an object by passing constructed otherwise). If a string, it is converted to an object by passing
it to `url.parse()`. it to `url.parse()`.
@ -356,7 +356,7 @@ object returned by `url.parse()` are shown. Below it are properties of a WHATWG
#### Constructor: new URL(input[, base]) #### Constructor: new URL(input[, base])
* `input` {string} The input URL to parse * `input` {string} The input URL to parse
* `base` {string | URL} The base URL to resolve against if the `input` is not * `base` {string|URL} The base URL to resolve against if the `input` is not
absolute. absolute.
Creates a new `URL` object by parsing the `input` relative to the `base`. If Creates a new `URL` object by parsing the `input` relative to the `base`. If
@ -388,7 +388,7 @@ Additional [examples of parsed URLs][] may be found in the WHATWG URL Standard.
#### url.hash #### url.hash
* {String} * {string}
Gets and sets the fragment portion of the URL. Gets and sets the fragment portion of the URL.
@ -409,7 +409,7 @@ percent-encode may vary somewhat from what the [`url.parse()`][] and
#### url.host #### url.host
* {String} * {string}
Gets and sets the host portion of the URL. Gets and sets the host portion of the URL.
@ -427,7 +427,7 @@ Invalid host values assigned to the `host` property are ignored.
#### url.hostname #### url.hostname
* {String} * {string}
Gets and sets the hostname portion of the URL. The key difference between Gets and sets the hostname portion of the URL. The key difference between
`url.host` and `url.hostname` is that `url.hostname` does *not* include the `url.host` and `url.hostname` is that `url.hostname` does *not* include the
@ -447,7 +447,7 @@ Invalid hostname values assigned to the `hostname` property are ignored.
#### url.href #### url.href
* {String} * {string}
Gets and sets the serialized URL. Gets and sets the serialized URL.
@ -472,7 +472,7 @@ will be thrown.
#### url.origin #### url.origin
* {String} * {string}
Gets the read-only serialization of the URL's origin. Unicode characters that Gets the read-only serialization of the URL's origin. Unicode characters that
may be contained within the hostname will be encoded as-is without [Punycode][] may be contained within the hostname will be encoded as-is without [Punycode][]
@ -495,7 +495,7 @@ console.log(idnURL.hostname);
#### url.password #### url.password
* {String} * {string}
Gets and sets the password portion of the URL. Gets and sets the password portion of the URL.
@ -516,7 +516,7 @@ percent-encode may vary somewhat from what the [`url.parse()`][] and
#### url.pathname #### url.pathname
* {String} * {string}
Gets and sets the path portion of the URL. Gets and sets the path portion of the URL.
@ -537,7 +537,7 @@ to percent-encode may vary somewhat from what the [`url.parse()`][] and
#### url.port #### url.port
* {String} * {string}
Gets and sets the port portion of the URL. Gets and sets the port portion of the URL.
@ -592,7 +592,7 @@ lies outside the range denoted above, it is ignored.
#### url.protocol #### url.protocol
* {String} * {string}
Gets and sets the protocol portion of the URL. Gets and sets the protocol portion of the URL.
@ -610,7 +610,7 @@ Invalid URL protocol values assigned to the `protocol` property are ignored.
#### url.search #### url.search
* {String} * {string}
Gets and sets the serialized query portion of the URL. Gets and sets the serialized query portion of the URL.
@ -640,7 +640,7 @@ documentation for details.
#### url.username #### url.username
* {String} * {string}
Gets and sets the username portion of the URL. Gets and sets the username portion of the URL.
@ -661,7 +661,7 @@ and [`url.format()`][] methods would produce.
#### url.toString() #### url.toString()
* Returns: {String} * Returns: {string}
The `toString()` method on the `URL` object returns the serialized URL. The The `toString()` method on the `URL` object returns the serialized URL. The
value returned is equivalent to that of [`url.href`][] and [`url.toJSON()`][]. value returned is equivalent to that of [`url.href`][] and [`url.toJSON()`][].
@ -672,7 +672,7 @@ to customize the serialization process of the URL. For more flexibility,
#### url.toJSON() #### url.toJSON()
* Returns: {String} * Returns: {string}
The `toJSON()` method on the `URL` object returns the serialized URL. The The `toJSON()` method on the `URL` object returns the serialized URL. The
value returned is equivalent to that of [`url.href`][] and value returned is equivalent to that of [`url.href`][] and
@ -897,7 +897,7 @@ no such pairs, an empty array is returned.
#### urlSearchParams.has(name) #### urlSearchParams.has(name)
* `name` {string} * `name` {string}
* Returns: {Boolean} * Returns: {boolean}
Returns `true` if there is at least one name-value pair whose name is `name`. Returns `true` if there is at least one name-value pair whose name is `name`.
@ -961,7 +961,7 @@ console.log(params.toString());
#### urlSearchParams.toString() #### urlSearchParams.toString()
* Returns: {String} * Returns: {string}
Returns the search parameters serialized as a string, with characters Returns the search parameters serialized as a string, with characters
percent-encoded where necessary. percent-encoded where necessary.
@ -996,7 +996,7 @@ for (const [name, value] of params) {
### require('url').domainToASCII(domain) ### require('url').domainToASCII(domain)
* `domain` {string} * `domain` {string}
* Returns: {String} * Returns: {string}
Returns the [Punycode][] ASCII serialization of the `domain`. If `domain` is an Returns the [Punycode][] ASCII serialization of the `domain`. If `domain` is an
invalid domain, the empty string is returned. invalid domain, the empty string is returned.
@ -1019,7 +1019,7 @@ the new `URL` implementation but is not part of the WHATWG URL standard.
### require('url').domainToUnicode(domain) ### require('url').domainToUnicode(domain)
* `domain` {string} * `domain` {string}
* Returns: {String} * Returns: {string}
Returns the Unicode serialization of the `domain`. If `domain` is an invalid Returns the Unicode serialization of the `domain`. If `domain` is an invalid
domain, the empty string is returned. domain, the empty string is returned.

9
tools/doc/type-parser.js

@ -4,12 +4,13 @@ const jsDocPrefix = 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/';
const jsDocUrl = jsDocPrefix + 'Reference/Global_Objects/'; const jsDocUrl = jsDocPrefix + 'Reference/Global_Objects/';
const jsPrimitiveUrl = jsDocPrefix + 'Data_structures'; const jsPrimitiveUrl = jsDocPrefix + 'Data_structures';
const jsPrimitives = { const jsPrimitives = {
'integer': 'Number', // this is for extending
'number': 'Number',
'string': 'String',
'boolean': 'Boolean', 'boolean': 'Boolean',
'integer': 'Number', // not a primitive, used for clarification
'null': 'Null', 'null': 'Null',
'symbol': 'Symbol' 'number': 'Number',
'string': 'String',
'symbol': 'Symbol',
'undefined': 'Undefined'
}; };
const jsGlobalTypes = [ const jsGlobalTypes = [
'Error', 'Object', 'Function', 'Array', 'TypedArray', 'Uint8Array', 'Error', 'Object', 'Function', 'Array', 'TypedArray', 'Uint8Array',

Loading…
Cancel
Save