Created
June 30, 2018 00:51
-
-
Save rubys/bae70ed087efec625ac04823aaaf803e to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /Users/rubys/tmp/all.html 2018-06-29 20:42:20.000000000 -0400 | |
+++ out/doc/api/all.html 2018-06-29 20:42:46.000000000 -0400 | |
@@ -3,7 +3,7 @@ | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
- <title>About this Documentation | Node.js v11.0.0 Documentation</title> | |
+ <title>Node.js v11.0.0 Documentation</title> | |
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic"> | |
<link rel="stylesheet" href="assets/style.css"> | |
<link rel="stylesheet" href="assets/sh.css"> | |
@@ -117,7 +117,8 @@ | |
<div id="toc"> | |
<h2>Table of Contents</h2> | |
- <ul> | |
+ | |
+ <ul> | |
<li><a href="#documentation_about_this_documentation">About this Documentation</a><ul> | |
<li><a href="#documentation_contributing">Contributing</a></li> | |
<li><a href="#documentation_stability_index">Stability Index</a></li> | |
@@ -3004,13 +3005,10 @@ | |
</ul> | |
</li> | |
</ul> | |
- | |
- </div> | |
+</div> | |
<div id="apicontent"> | |
- <!--lint disable prohibited-strings--> | |
-<!-- [start-include:documentation.md] --> | |
-<h1>About this Documentation<span><a class="mark" href="#documentation_about_this_documentation" id="documentation_about_this_documentation">#</a></span></h1> | |
+ <h1>About this Documentation<span><a class="mark" href="#documentation_about_this_documentation" id="documentation_about_this_documentation">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
<!-- type=misc --> | |
<p>The goal of this documentation is to comprehensively explain the Node.js | |
@@ -3035,21 +3033,21 @@ | |
all. Others are brand new and experimental, or known to be hazardous | |
and in the process of being redesigned.</p> | |
<p>The stability indices are as follows:</p> | |
-<div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated. This feature is known to be problematic, and changes may be planned. Do not rely on it. Use of the feature may cause warnings to be emitted. Backwards compatibility across major versions should not be expected.</div><!-- separator --> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental. This feature is still under active development and subject to non-backwards compatible changes, or even removal, in any future version. Use of the feature is not recommended in production environments. Experimental features are not subject to the Node.js Semantic Versioning model.</div><!-- separator --> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable. The API has proven satisfactory. Compatibility with the npm ecosystem is a high priority, and will not be broken unless absolutely necessary.</div><p>Caution must be used when making use of <code>Experimental</code> features, particularly | |
+<div class="api_stability api_stability_0">Stability: 0 - Deprecated. This feature is known to be problematic, and changes may be planned. Do not rely on it. Use of the feature may cause warnings to be emitted. Backwards compatibility across major versions should not be expected.</div><!-- separator --> | |
+<div class="api_stability api_stability_1">Stability: 1 - Experimental. This feature is still under active development and subject to non-backwards compatible changes, or even removal, in any future version. Use of the feature is not recommended in production environments. Experimental features are not subject to the Node.js Semantic Versioning model.</div><!-- separator --> | |
+<div class="api_stability api_stability_2">Stability: 2 - Stable. The API has proven satisfactory. Compatibility with the npm ecosystem is a high priority, and will not be broken unless absolutely necessary.</div><p>Caution must be used when making use of <code>Experimental</code> features, particularly | |
within modules that may be used as dependencies (or dependencies of | |
dependencies) within a Node.js application. End users may not be aware that | |
experimental features are being used, and therefore may experience unexpected | |
failures or behavior changes when API modifications occur. To help avoid such | |
surprises, <code>Experimental</code> features may require a command-line flag to | |
explicitly enable them, or may cause a process warning to be emitted. | |
-By default, such warnings are printed to <a href="process.html#process_process_stderr"><code>stderr</code></a> and may be handled by | |
-attaching a listener to the <a href="process.html#process_event_warning"><code>'warning'</code></a> event.</p> | |
+By default, such warnings are printed to <a href="#process_process_stderr"><code>stderr</code></a> and may be handled by | |
+attaching a listener to the <a href="#process_event_warning"><code>'warning'</code></a> event.</p> | |
<h2>JSON Output<span><a class="mark" href="#documentation_json_output" id="documentation_json_output">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.6.12</span> | |
-</div><div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>Every <code>.html</code> document has a corresponding <code>.json</code> document presenting | |
+</div><div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>Every <code>.html</code> document has a corresponding <code>.json</code> document presenting | |
the same information in a structured manner. This feature is | |
experimental, and added for the benefit of IDEs and other utilities that | |
wish to do programmatic things with the documentation.</p> | |
@@ -3063,13 +3061,11 @@ | |
relative to Linux and macOS. For an example of the subtle ways in which it's | |
sometimes impossible to replace Unix syscall semantics on Windows, see <a href="https://github.com/nodejs/node/issues/4760">Node | |
issue 4760</a>.</p> | |
-<!-- [end-include:documentation.md] --> | |
-<!-- [start-include:synopsis.md] --> | |
<h1>Usage<span><a class="mark" href="#synopsis_usage" id="synopsis_usage">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
<!--type=misc--> | |
<p><code>node [options] [V8 options] [script.js | -e "script" | - ] [arguments]</code></p> | |
-<p>Please see the <a href="cli.html#cli_command_line_options">Command Line Options</a> document for information about | |
+<p>Please see the <a href="#cli_command_line_options">Command Line Options</a> document for information about | |
different options and ways to run scripts with Node.js.</p> | |
<h2>Example<span><a class="mark" href="#synopsis_example" id="synopsis_example">#</a></span></h2> | |
<p>An example of a <a href="http.html">web server</a> written with Node.js which responds with | |
@@ -3133,11 +3129,9 @@ | |
<p>If the browser displays the string <code>Hello, world!</code>, that indicates | |
the server is working.</p> | |
<p>Many of the examples in the documentation can be run similarly.</p> | |
-<!-- [end-include:synopsis.md] --> | |
-<!-- [start-include:assert.md] --> | |
<h1>Assert<span><a class="mark" href="#assert_assert" id="assert_assert">#</a></span></h1> | |
<!--introduced_in=v0.1.21--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>assert</code> module provides a simple set of assertion tests that can be used to | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>assert</code> module provides a simple set of assertion tests that can be used to | |
test invariants.</p> | |
<p>A <code>strict</code> and a <code>legacy</code> mode exist, while it is recommended to only use | |
<a href="#assert_strict_mode"><code>strict mode</code></a>.</p> | |
@@ -3222,7 +3216,7 @@ | |
</details> | |
</div><p>When using the <code>strict mode</code>, any <code>assert</code> function will use the equality used | |
in the strict function mode. So <a href="#assert_assert_deepequal_actual_expected_message"><code>assert.deepEqual()</code></a> will, for example, | |
-work the same as <a href="assert.html#assert_assert_deepstrictequal_actual_expected_message"><code>assert.deepStrictEqual()</code></a>.</p> | |
+work the same as <a href="#assert_assert_deepstrictequal_actual_expected_message"><code>assert.deepStrictEqual()</code></a>.</p> | |
<p>On top of that, error messages which involve objects produce an error diff | |
instead of displaying both objects. That is not the case for the legacy mode.</p> | |
<p>It can be accessed using:</p> | |
@@ -3249,7 +3243,7 @@ | |
<p>To deactivate the colors, use the <code>NODE_DISABLE_COLORS</code> environment variable. | |
Please note that this will also deactivate the colors in the REPL.</p> | |
<h2>Legacy mode<span><a class="mark" href="#assert_legacy_mode" id="assert_legacy_mode">#</a></span></h2> | |
-<div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use strict mode instead.</div><p>When accessing <code>assert</code> directly instead of using the <code>strict</code> property, the | |
+<div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use strict mode instead.</div><p>When accessing <code>assert</code> directly instead of using the <code>strict</code> property, the | |
<a href="https://tc39.github.io/ecma262/#sec-abstract-equality-comparison">Abstract Equality Comparison</a> will be used for any function without "strict" | |
in its name, such as <a href="#assert_assert_deepequal_actual_expected_message"><code>assert.deepEqual()</code></a>.</p> | |
<p>It can be accessed using:</p> | |
@@ -3301,15 +3295,15 @@ | |
<li><code>message</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
</ul> | |
<p><strong>Strict mode</strong></p> | |
-<p>An alias of <a href="assert.html#assert_assert_deepstrictequal_actual_expected_message"><code>assert.deepStrictEqual()</code></a>.</p> | |
+<p>An alias of <a href="#assert_assert_deepstrictequal_actual_expected_message"><code>assert.deepStrictEqual()</code></a>.</p> | |
<p><strong>Legacy mode</strong></p> | |
-<div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="assert.html#assert_assert_deepstrictequal_actual_expected_message"><code>assert.deepStrictEqual()</code></a> instead.</div><p>Tests for deep equality between the <code>actual</code> and <code>expected</code> parameters. | |
+<div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#assert_assert_deepstrictequal_actual_expected_message"><code>assert.deepStrictEqual()</code></a> instead.</div><p>Tests for deep equality between the <code>actual</code> and <code>expected</code> parameters. | |
Primitive values are compared with the <a href="https://tc39.github.io/ecma262/#sec-abstract-equality-comparison">Abstract Equality Comparison</a> | |
( <code>==</code> ).</p> | |
<p>Only <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties">enumerable "own" properties</a> are considered. The | |
<a href="#assert_assert_deepequal_actual_expected_message"><code>assert.deepEqual()</code></a> implementation does not test the | |
<a href="https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots"><code>[[Prototype]]</code></a> of objects or enumerable own <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol"><code>Symbol</code></a> | |
-properties. For such checks, consider using <a href="assert.html#assert_assert_deepstrictequal_actual_expected_message"><code>assert.deepStrictEqual()</code></a> | |
+properties. For such checks, consider using <a href="#assert_assert_deepstrictequal_actual_expected_message"><code>assert.deepStrictEqual()</code></a> | |
instead. <a href="#assert_assert_deepequal_actual_expected_message"><code>assert.deepEqual()</code></a> can have potentially surprising results. The | |
following example does not throw an <code>AssertionError</code> because the properties on | |
the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions"><code>RegExp</code></a> object are not enumerable:</p> | |
@@ -3356,7 +3350,7 @@ | |
<p>If the values are not equal, an <code>AssertionError</code> is thrown with a <code>message</code> | |
property set equal to the value of the <code>message</code> parameter. If the <code>message</code> | |
parameter is undefined, a default error message is assigned. If the <code>message</code> | |
-parameter is an instance of an <a href="errors.html#errors_class_error"><code>Error</code></a> then it will be thrown instead of the | |
+parameter is an instance of an <a href="#errors_class_error"><code>Error</code></a> then it will be thrown instead of the | |
<code>AssertionError</code>.</p> | |
<h2>assert.deepStrictEqual(actual, expected[, message])<span><a class="mark" href="#assert_assert_deepstrictequal_actual_expected_message" id="assert_assert_deepstrictequal_actual_expected_message">#</a></span></h2> | |
<div class="api_metadata"> | |
@@ -3405,7 +3399,7 @@ | |
<li><a href="https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots"><code>[[Prototype]]</code></a> of objects are compared using | |
the <a href="https://tc39.github.io/ecma262/#sec-strict-equality-comparison">Strict Equality Comparison</a>.</li> | |
<li>Only <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties">enumerable "own" properties</a> are considered.</li> | |
-<li><a href="errors.html#errors_class_error"><code>Error</code></a> names and messages are always compared, even if these are not | |
+<li><a href="#errors_class_error"><code>Error</code></a> names and messages are always compared, even if these are not | |
enumerable properties.</li> | |
<li>Enumerable own <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol"><code>Symbol</code></a> properties are compared as well.</li> | |
<li><a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive#Primitive_wrapper_objects_in_JavaScript">Object wrappers</a> are compared both as objects and unwrapped values.</li> | |
@@ -3501,7 +3495,7 @@ | |
<p>If the values are not equal, an <code>AssertionError</code> is thrown with a <code>message</code> | |
property set equal to the value of the <code>message</code> parameter. If the <code>message</code> | |
parameter is undefined, a default error message is assigned. If the <code>message</code> | |
-parameter is an instance of an <a href="errors.html#errors_class_error"><code>Error</code></a> then it will be thrown instead of the | |
+parameter is an instance of an <a href="#errors_class_error"><code>Error</code></a> then it will be thrown instead of the | |
<code>AssertionError</code>.</p> | |
<h2>assert.doesNotReject(block[, error][, message])<span><a class="mark" href="#assert_assert_doesnotreject_block_error_message" id="assert_assert_doesnotreject_block_error_message">#</a></span></h2> | |
<div class="api_metadata"> | |
@@ -3517,7 +3511,7 @@ | |
<p>If <code>block</code> is a function and it throws an error synchronously, | |
<code>assert.doesNotReject()</code> will return a rejected <code>Promise</code> with that error. If | |
the function does not return a promise, <code>assert.doesNotReject()</code> will return a | |
-rejected <code>Promise</code> with an <a href="errors.html#errors_err_invalid_return_value"><code>ERR_INVALID_RETURN_VALUE</code></a> error. In both cases | |
+rejected <code>Promise</code> with an <a href="#errors_err_invalid_return_value"><code>ERR_INVALID_RETURN_VALUE</code></a> error. In both cases | |
the error handler is skipped.</p> | |
<p>Please note: Using <code>assert.doesNotReject()</code> is actually not useful because there | |
is little benefit by catching a rejection and then rejecting it again. Instead, | |
@@ -3575,7 +3569,7 @@ | |
to the caller.</p> | |
<p>If specified, <code>error</code> can be a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes"><code>Class</code></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions"><code>RegExp</code></a> or a validation | |
function. See <a href="#assert_assert_throws_block_error_message"><code>assert.throws()</code></a> for more details.</p> | |
-<p>The following, for instance, will throw the <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> because there is no | |
+<p>The following, for instance, will throw the <a href="#errors_class_typeerror"><code>TypeError</code></a> because there is no | |
matching error type in the assertion:</p> | |
<!-- eslint-disable no-restricted-syntax --> | |
<pre><code class="lang-js">assert.doesNotThrow( | |
@@ -3619,7 +3613,7 @@ | |
<p><strong>Strict mode</strong></p> | |
<p>An alias of <a href="#assert_assert_strictequal_actual_expected_message"><code>assert.strictEqual()</code></a>.</p> | |
<p><strong>Legacy mode</strong></p> | |
-<div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#assert_assert_strictequal_actual_expected_message"><code>assert.strictEqual()</code></a> instead.</div><p>Tests shallow, coercive equality between the <code>actual</code> and <code>expected</code> parameters | |
+<div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#assert_assert_strictequal_actual_expected_message"><code>assert.strictEqual()</code></a> instead.</div><p>Tests shallow, coercive equality between the <code>actual</code> and <code>expected</code> parameters | |
using the <a href="https://tc39.github.io/ecma262/#sec-abstract-equality-comparison">Abstract Equality Comparison</a> ( <code>==</code> ).</p> | |
<pre><code class="lang-js">const assert = require('assert'); | |
@@ -3636,7 +3630,7 @@ | |
<p>If the values are not equal, an <code>AssertionError</code> is thrown with a <code>message</code> | |
property set equal to the value of the <code>message</code> parameter. If the <code>message</code> | |
parameter is undefined, a default error message is assigned. If the <code>message</code> | |
-parameter is an instance of an <a href="errors.html#errors_class_error"><code>Error</code></a> then it will be thrown instead of the | |
+parameter is an instance of an <a href="#errors_class_error"><code>Error</code></a> then it will be thrown instead of the | |
<code>AssertionError</code>.</p> | |
<h2>assert.fail([message])<span><a class="mark" href="#assert_assert_fail_message" id="assert_assert_fail_message">#</a></span></h2> | |
<div class="api_metadata"> | |
@@ -3645,7 +3639,7 @@ | |
<li><code>message</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a> <strong>Default:</strong> <code>'Failed'</code></li> | |
</ul> | |
<p>Throws an <code>AssertionError</code> with the provided error message or a default error | |
-message. If the <code>message</code> parameter is an instance of an <a href="errors.html#errors_class_error"><code>Error</code></a> then it | |
+message. If the <code>message</code> parameter is an instance of an <a href="#errors_class_error"><code>Error</code></a> then it | |
will be thrown instead of the <code>AssertionError</code>.</p> | |
<pre><code class="lang-js">const assert = require('assert').strict; | |
@@ -3680,13 +3674,13 @@ | |
<li><code>operator</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'!='</code></li> | |
<li><code>stackStartFunction</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> <strong>Default:</strong> <code>assert.fail</code></li> | |
</ul> | |
-<div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <code>assert.fail([message])</code> or other assert functions instead.</div><p>If <code>message</code> is falsy, the error message is set as the values of <code>actual</code> and | |
+<div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <code>assert.fail([message])</code> or other assert functions instead.</div><p>If <code>message</code> is falsy, the error message is set as the values of <code>actual</code> and | |
<code>expected</code> separated by the provided <code>operator</code>. If just the two <code>actual</code> and | |
<code>expected</code> arguments are provided, <code>operator</code> will default to <code>'!='</code>. If | |
<code>message</code> is provided as third argument it will be used as the error message and | |
the other arguments will be stored as properties on the thrown object. If | |
<code>stackStartFunction</code> is provided, all stack frames above that function will be | |
-removed from stacktrace (see <a href="errors.html#errors_error_capturestacktrace_targetobject_constructoropt"><code>Error.captureStackTrace</code></a>). If no arguments are | |
+removed from stacktrace (see <a href="#errors_error_capturestacktrace_targetobject_constructoropt"><code>Error.captureStackTrace</code></a>). If no arguments are | |
given, the default message <code>Failed</code> will be used.</p> | |
<pre><code class="lang-js">const assert = require('assert').strict; | |
@@ -3797,7 +3791,7 @@ | |
<p><strong>Strict mode</strong></p> | |
<p>An alias of <a href="#assert_assert_notdeepstrictequal_actual_expected_message"><code>assert.notDeepStrictEqual()</code></a>.</p> | |
<p><strong>Legacy mode</strong></p> | |
-<div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#assert_assert_notdeepstrictequal_actual_expected_message"><code>assert.notDeepStrictEqual()</code></a> instead.</div><p>Tests for any deep inequality. Opposite of <a href="#assert_assert_deepequal_actual_expected_message"><code>assert.deepEqual()</code></a>.</p> | |
+<div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#assert_assert_notdeepstrictequal_actual_expected_message"><code>assert.notDeepStrictEqual()</code></a> instead.</div><p>Tests for any deep inequality. Opposite of <a href="#assert_assert_deepequal_actual_expected_message"><code>assert.deepEqual()</code></a>.</p> | |
<pre><code class="lang-js">const assert = require('assert'); | |
const obj1 = { | |
@@ -3832,7 +3826,7 @@ | |
<p>If the values are deeply equal, an <code>AssertionError</code> is thrown with a <code>message</code> | |
property set equal to the value of the <code>message</code> parameter. If the <code>message</code> | |
parameter is undefined, a default error message is assigned. If the <code>message</code> | |
-parameter is an instance of an <a href="errors.html#errors_class_error"><code>Error</code></a> then it will be thrown instead of the | |
+parameter is an instance of an <a href="#errors_class_error"><code>Error</code></a> then it will be thrown instead of the | |
<code>AssertionError</code>.</p> | |
<h2>assert.notDeepStrictEqual(actual, expected[, message])<span><a class="mark" href="#assert_assert_notdeepstrictequal_actual_expected_message" id="assert_assert_notdeepstrictequal_actual_expected_message">#</a></span></h2> | |
<div class="api_metadata"> | |
@@ -3870,7 +3864,7 @@ | |
<li><code>expected</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a></li> | |
<li><code>message</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
</ul> | |
-<p>Tests for deep strict inequality. Opposite of <a href="assert.html#assert_assert_deepstrictequal_actual_expected_message"><code>assert.deepStrictEqual()</code></a>.</p> | |
+<p>Tests for deep strict inequality. Opposite of <a href="#assert_assert_deepstrictequal_actual_expected_message"><code>assert.deepStrictEqual()</code></a>.</p> | |
<pre><code class="lang-js">const assert = require('assert').strict; | |
assert.notDeepStrictEqual({ a: 1 }, { a: '1' }); | |
@@ -3879,7 +3873,7 @@ | |
<p>If the values are deeply and strictly equal, an <code>AssertionError</code> is thrown with | |
a <code>message</code> property set equal to the value of the <code>message</code> parameter. If the | |
<code>message</code> parameter is undefined, a default error message is assigned. If the | |
-<code>message</code> parameter is an instance of an <a href="errors.html#errors_class_error"><code>Error</code></a> then it will be thrown | |
+<code>message</code> parameter is an instance of an <a href="#errors_class_error"><code>Error</code></a> then it will be thrown | |
instead of the <code>AssertionError</code>.</p> | |
<h2>assert.notEqual(actual, expected[, message])<span><a class="mark" href="#assert_assert_notequal_actual_expected_message" id="assert_assert_notequal_actual_expected_message">#</a></span></h2> | |
<div class="api_metadata"> | |
@@ -3892,7 +3886,7 @@ | |
<p><strong>Strict mode</strong></p> | |
<p>An alias of <a href="#assert_assert_notstrictequal_actual_expected_message"><code>assert.notStrictEqual()</code></a>.</p> | |
<p><strong>Legacy mode</strong></p> | |
-<div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#assert_assert_notstrictequal_actual_expected_message"><code>assert.notStrictEqual()</code></a> instead.</div><p>Tests shallow, coercive inequality with the <a href="https://tc39.github.io/ecma262/#sec-abstract-equality-comparison">Abstract Equality Comparison</a> | |
+<div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#assert_assert_notstrictequal_actual_expected_message"><code>assert.notStrictEqual()</code></a> instead.</div><p>Tests shallow, coercive inequality with the <a href="https://tc39.github.io/ecma262/#sec-abstract-equality-comparison">Abstract Equality Comparison</a> | |
( <code>!=</code> ).</p> | |
<pre><code class="lang-js">const assert = require('assert'); | |
@@ -3908,7 +3902,7 @@ | |
<p>If the values are equal, an <code>AssertionError</code> is thrown with a <code>message</code> property | |
set equal to the value of the <code>message</code> parameter. If the <code>message</code> parameter is | |
undefined, a default error message is assigned. If the <code>message</code> parameter is an | |
-instance of an <a href="errors.html#errors_class_error"><code>Error</code></a> then it will be thrown instead of the | |
+instance of an <a href="#errors_class_error"><code>Error</code></a> then it will be thrown instead of the | |
<code>AssertionError</code>.</p> | |
<h2>assert.notStrictEqual(actual, expected[, message])<span><a class="mark" href="#assert_assert_notstrictequal_actual_expected_message" id="assert_assert_notstrictequal_actual_expected_message">#</a></span></h2> | |
<div class="api_metadata"> | |
@@ -3944,7 +3938,7 @@ | |
<p>If the values are strictly equal, an <code>AssertionError</code> is thrown with a <code>message</code> | |
property set equal to the value of the <code>message</code> parameter. If the <code>message</code> | |
parameter is undefined, a default error message is assigned. If the <code>message</code> | |
-parameter is an instance of an <a href="errors.html#errors_class_error"><code>Error</code></a> then it will be thrown instead of the | |
+parameter is an instance of an <a href="#errors_class_error"><code>Error</code></a> then it will be thrown instead of the | |
<code>AssertionError</code>.</p> | |
<h2>assert.ok(value[, message])<span><a class="mark" href="#assert_assert_ok_value_message" id="assert_assert_ok_value_message">#</a></span></h2> | |
<div class="api_metadata"> | |
@@ -3968,7 +3962,7 @@ | |
<p>If <code>value</code> is not truthy, an <code>AssertionError</code> is thrown with a <code>message</code> | |
property set equal to the value of the <code>message</code> parameter. If the <code>message</code> | |
parameter is <code>undefined</code>, a default error message is assigned. If the <code>message</code> | |
-parameter is an instance of an <a href="errors.html#errors_class_error"><code>Error</code></a> then it will be thrown instead of the | |
+parameter is an instance of an <a href="#errors_class_error"><code>Error</code></a> then it will be thrown instead of the | |
<code>AssertionError</code>. | |
If no arguments are passed in at all <code>message</code> will be set to the string: | |
<code>'No value argument passed to `assert.ok()`'</code>.</p> | |
@@ -4027,7 +4021,7 @@ | |
<p>If <code>block</code> is a function and it throws an error synchronously, | |
<code>assert.rejects()</code> will return a rejected <code>Promise</code> with that error. If the | |
function does not return a promise, <code>assert.rejects()</code> will return a rejected | |
-<code>Promise</code> with an <a href="errors.html#errors_err_invalid_return_value"><code>ERR_INVALID_RETURN_VALUE</code></a> error. In both cases the error | |
+<code>Promise</code> with an <a href="#errors_err_invalid_return_value"><code>ERR_INVALID_RETURN_VALUE</code></a> error. In both cases the error | |
handler is skipped.</p> | |
<p>Besides the async nature to await the completion behaves identically to | |
<a href="#assert_assert_throws_block_error_message"><code>assert.throws()</code></a>.</p> | |
@@ -4101,7 +4095,7 @@ | |
<p>If the values are not strictly equal, an <code>AssertionError</code> is thrown with a | |
<code>message</code> property set equal to the value of the <code>message</code> parameter. If the | |
<code>message</code> parameter is undefined, a default error message is assigned. If the | |
-<code>message</code> parameter is an instance of an <a href="errors.html#errors_class_error"><code>Error</code></a> then it will be thrown | |
+<code>message</code> parameter is an instance of an <a href="#errors_class_error"><code>Error</code></a> then it will be thrown | |
instead of the <code>AssertionError</code>.</p> | |
<h2>assert.throws(block[, error][, message])<span><a class="mark" href="#assert_assert_throws_block_error_message" id="assert_assert_throws_block_error_message">#</a></span></h2> | |
<div class="api_metadata"> | |
@@ -4268,11 +4262,9 @@ | |
</code></pre> | |
<p>Due to the confusing notation, it is recommended not to use a string as the | |
second argument. This might lead to difficult-to-spot errors.</p> | |
-<!-- [end-include:assert.md] --> | |
-<!-- [start-include:async_hooks.md] --> | |
<h1>Async Hooks<span><a class="mark" href="#async_hooks_async_hooks" id="async_hooks_async_hooks">#</a></span></h1> | |
<!--introduced_in=v8.1.0--> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>The <code>async_hooks</code> module provides an API to register callbacks tracking the | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>The <code>async_hooks</code> module provides an API to register callbacks tracking the | |
lifetime of asynchronous resources created inside a Node.js application. | |
It can be accessed using:</p> | |
<pre><code class="lang-js">const async_hooks = require('async_hooks'); | |
@@ -4346,7 +4338,7 @@ | |
<li><code>destroy</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> The <a href="#async_hooks_destroy_asyncid"><code>destroy</code> callback</a>.</li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="async_hooks.html#async_hooks_async_hooks_createhook_callbacks" class="type"><AsyncHook></a> Instance used for disabling and enabling hooks</li> | |
+<li>Returns: <a href="#async_hooks_async_hooks_createhook_callbacks" class="type"><AsyncHook></a> Instance used for disabling and enabling hooks</li> | |
</ul> | |
<p>Registers functions to be called for different lifetime events of each async | |
operation.</p> | |
@@ -4413,7 +4405,7 @@ | |
doing this the otherwise infinite recursion is broken.</p> | |
<h4>asyncHook.enable()<span><a class="mark" href="#async_hooks_asynchook_enable" id="async_hooks_asynchook_enable">#</a></span></h4> | |
<ul> | |
-<li>Returns: <a href="async_hooks.html#async_hooks_async_hooks_createhook_callbacks" class="type"><AsyncHook></a> A reference to <code>asyncHook</code>.</li> | |
+<li>Returns: <a href="#async_hooks_async_hooks_createhook_callbacks" class="type"><AsyncHook></a> A reference to <code>asyncHook</code>.</li> | |
</ul> | |
<p>Enable the callbacks for a given <code>AsyncHook</code> instance. If no callbacks are | |
provided enabling is a noop.</p> | |
@@ -4425,7 +4417,7 @@ | |
</code></pre> | |
<h4>asyncHook.disable()<span><a class="mark" href="#async_hooks_asynchook_disable" id="async_hooks_asynchook_disable">#</a></span></h4> | |
<ul> | |
-<li>Returns: <a href="async_hooks.html#async_hooks_async_hooks_createhook_callbacks" class="type"><AsyncHook></a> A reference to <code>asyncHook</code>.</li> | |
+<li>Returns: <a href="#async_hooks_async_hooks_createhook_callbacks" class="type"><AsyncHook></a> A reference to <code>asyncHook</code>.</li> | |
</ul> | |
<p>Disable the callbacks for a given <code>AsyncHook</code> instance from the global pool of | |
<code>AsyncHook</code> callbacks to be executed. Once a hook has been disabled it will not | |
@@ -4825,7 +4817,7 @@ | |
<h4>asyncResource.emitBefore()<span><a class="mark" href="#async_hooks_asyncresource_emitbefore" id="async_hooks_asyncresource_emitbefore">#</a></span></h4> | |
<div class="api_metadata"> | |
<span>Deprecated since: v9.6.0</span> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="async_hooks.html#async_hooks_asyncresource_runinasyncscope_fn_thisarg_args"><code>asyncResource.runInAsyncScope()</code></a> instead.</div><p>Call all <code>before</code> callbacks to notify that a new asynchronous execution context | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#async_hooks_asyncresource_runinasyncscope_fn_thisarg_args"><code>asyncResource.runInAsyncScope()</code></a> instead.</div><p>Call all <code>before</code> callbacks to notify that a new asynchronous execution context | |
is being entered. If nested calls to <code>emitBefore()</code> are made, the stack of | |
<code>asyncId</code>s will be tracked and properly unwound.</p> | |
<p><code>before</code> and <code>after</code> calls must be unwound in the same order that they | |
@@ -4836,7 +4828,7 @@ | |
<h4>asyncResource.emitAfter()<span><a class="mark" href="#async_hooks_asyncresource_emitafter" id="async_hooks_asyncresource_emitafter">#</a></span></h4> | |
<div class="api_metadata"> | |
<span>Deprecated since: v9.6.0</span> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="async_hooks.html#async_hooks_asyncresource_runinasyncscope_fn_thisarg_args"><code>asyncResource.runInAsyncScope()</code></a> instead.</div><p>Call all <code>after</code> callbacks. If nested calls to <code>emitBefore()</code> were made, then | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#async_hooks_asyncresource_runinasyncscope_fn_thisarg_args"><code>asyncResource.runInAsyncScope()</code></a> instead.</div><p>Call all <code>after</code> callbacks. If nested calls to <code>emitBefore()</code> were made, then | |
make sure the stack is unwound properly. Otherwise an error will be thrown.</p> | |
<p>If the user's callback throws an exception, <code>emitAfter()</code> will automatically be | |
called for all <code>asyncId</code>s on the stack if the error is handled by a domain or | |
@@ -4860,11 +4852,9 @@ | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> The same <code>triggerAsyncId</code> that is passed to the | |
<code>AsyncResource</code> constructor.</li> | |
</ul> | |
-<!-- [end-include:async_hooks.md] --> | |
-<!-- [start-include:buffer.md] --> | |
<h1>Buffer<span><a class="mark" href="#buffer_buffer" id="buffer_buffer">#</a></span></h1> | |
<!--introduced_in=v0.1.90--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>Prior to the introduction of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray"><code>TypedArray</code></a>, the JavaScript language had no | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>Prior to the introduction of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray"><code>TypedArray</code></a>, the JavaScript language had no | |
mechanism for reading or manipulating streams of binary data. The <code>Buffer</code> class | |
was introduced as part of the Node.js API to enable interaction with octet | |
streams in TCP streams, file system operations, and other contexts.</p> | |
@@ -4928,12 +4918,12 @@ | |
<p><em>Developers should migrate all existing uses of the <code>new Buffer()</code> constructors | |
to one of these new APIs.</em></p> | |
<ul> | |
-<li><a href="buffer.html#buffer_class_method_buffer_from_array"><code>Buffer.from(array)</code></a> returns a new <code>Buffer</code> that <em>contains a copy</em> of the | |
+<li><a href="#buffer_class_method_buffer_from_array"><code>Buffer.from(array)</code></a> returns a new <code>Buffer</code> that <em>contains a copy</em> of the | |
provided octets.</li> | |
<li><a href="#buffer_class_method_buffer_from_arraybuffer_byteoffset_length"><code>Buffer.from(arrayBuffer[, byteOffset[, length]])</code></a> | |
returns a new <code>Buffer</code> that <em>shares the same allocated memory</em> as the given | |
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer"><code>ArrayBuffer</code></a>.</li> | |
-<li><a href="buffer.html#buffer_class_method_buffer_from_buffer"><code>Buffer.from(buffer)</code></a> returns a new <code>Buffer</code> that <em>contains a copy</em> of the | |
+<li><a href="#buffer_class_method_buffer_from_buffer"><code>Buffer.from(buffer)</code></a> returns a new <code>Buffer</code> that <em>contains a copy</em> of the | |
contents of the given <code>Buffer</code>.</li> | |
<li><a href="#buffer_class_method_buffer_from_string_encoding"><code>Buffer.from(string[, encoding])</code></a> returns a new | |
<code>Buffer</code> that <em>contains a copy</em> of the provided string.</li> | |
@@ -5106,8 +5096,8 @@ | |
<p>The <code>Buffer.from()</code> method, however, does not support the use of a mapping | |
function:</p> | |
<ul> | |
-<li><a href="buffer.html#buffer_class_method_buffer_from_array"><code>Buffer.from(array)</code></a></li> | |
-<li><a href="buffer.html#buffer_class_method_buffer_from_buffer"><code>Buffer.from(buffer)</code></a></li> | |
+<li><a href="#buffer_class_method_buffer_from_array"><code>Buffer.from(array)</code></a></li> | |
+<li><a href="#buffer_class_method_buffer_from_buffer"><code>Buffer.from(buffer)</code></a></li> | |
<li><a href="#buffer_class_method_buffer_from_arraybuffer_byteoffset_length"><code>Buffer.from(arrayBuffer[, byteOffset[, length]])</code></a></li> | |
<li><a href="#buffer_class_method_buffer_from_string_encoding"><code>Buffer.from(string[, encoding])</code></a></li> | |
</ul> | |
@@ -5147,7 +5137,7 @@ | |
</td></tr> | |
</table> | |
</details> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="buffer.html#buffer_class_method_buffer_from_array"><code>Buffer.from(array)</code></a> instead.</div><ul> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#buffer_class_method_buffer_from_array"><code>Buffer.from(array)</code></a> instead.</div><ul> | |
<li><code>array</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer[]></a> An array of bytes to copy from.</li> | |
</ul> | |
<p>Allocates a new <code>Buffer</code> using an <code>array</code> of octets.</p> | |
@@ -5179,7 +5169,7 @@ | |
</td></tr> | |
</table> | |
</details> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#buffer_class_method_buffer_from_arraybuffer_byteoffset_length"><code>Buffer.from(arrayBuffer[, byteOffset[, length]])</code></a> instead.</div><ul> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#buffer_class_method_buffer_from_arraybuffer_byteoffset_length"><code>Buffer.from(arrayBuffer[, byteOffset[, length]])</code></a> instead.</div><ul> | |
<li><code>arrayBuffer</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer" class="type"><ArrayBuffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer" class="type"><SharedArrayBuffer></a> An <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer"><code>ArrayBuffer</code></a>, | |
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer"><code>SharedArrayBuffer</code></a> or the <code>.buffer</code> property of a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray"><code>TypedArray</code></a>.</li> | |
<li><code>byteOffset</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> Index of first byte to expose. <strong>Default:</strong> <code>0</code>.</li> | |
@@ -5228,8 +5218,8 @@ | |
</td></tr> | |
</table> | |
</details> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="buffer.html#buffer_class_method_buffer_from_buffer"><code>Buffer.from(buffer)</code></a> instead.</div><ul> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> An existing <code>Buffer</code> or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"><code>Uint8Array</code></a> from which | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#buffer_class_method_buffer_from_buffer"><code>Buffer.from(buffer)</code></a> instead.</div><ul> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> An existing <code>Buffer</code> or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"><code>Uint8Array</code></a> from which | |
to copy data.</li> | |
</ul> | |
<p>Copies the passed <code>buffer</code> data onto a new <code>Buffer</code> instance.</p> | |
@@ -5265,11 +5255,11 @@ | |
</td></tr> | |
</table> | |
</details> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#buffer_class_method_buffer_alloc_size_fill_encoding"><code>Buffer.alloc()</code></a> instead (also see <a href="#buffer_class_method_buffer_allocunsafe_size"><code>Buffer.allocUnsafe()</code></a>).</div><ul> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#buffer_class_method_buffer_alloc_size_fill_encoding"><code>Buffer.alloc()</code></a> instead (also see <a href="#buffer_class_method_buffer_allocunsafe_size"><code>Buffer.allocUnsafe()</code></a>).</div><ul> | |
<li><code>size</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> The desired length of the new <code>Buffer</code>.</li> | |
</ul> | |
<p>Allocates a new <code>Buffer</code> of <code>size</code> bytes. If <code>size</code> is larger than | |
-<a href="#buffer_buffer_constants_max_length"><code>buffer.constants.MAX_LENGTH</code></a> or smaller than 0, <a href="errors.html#ERR_INVALID_OPT_VALUE"><code>ERR_INVALID_OPT_VALUE</code></a> is | |
+<a href="#buffer_buffer_constants_max_length"><code>buffer.constants.MAX_LENGTH</code></a> or smaller than 0, <a href="#ERR_INVALID_OPT_VALUE"><code>ERR_INVALID_OPT_VALUE</code></a> is | |
thrown. A zero-length <code>Buffer</code> is created if <code>size</code> is 0.</p> | |
<p>Prior to Node.js 8.0.0, the underlying memory for <code>Buffer</code> instances | |
created in this way is <em>not initialized</em>. The contents of a newly created | |
@@ -5300,7 +5290,7 @@ | |
</td></tr> | |
</table> | |
</details> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#buffer_class_method_buffer_from_string_encoding"><code>Buffer.from(string[, encoding])</code></a> instead.</div><ul> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#buffer_class_method_buffer_from_string_encoding"><code>Buffer.from(string[, encoding])</code></a> instead.</div><ul> | |
<li><code>string</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> String to encode.</li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The encoding of <code>string</code>. <strong>Default:</strong> <code>'utf8'</code>.</li> | |
</ul> | |
@@ -5337,7 +5327,7 @@ | |
</details> | |
</div><ul> | |
<li><code>size</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> The desired length of the new <code>Buffer</code>.</li> | |
-<li><code>fill</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> A value to pre-fill the new <code>Buffer</code> with. | |
+<li><code>fill</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> A value to pre-fill the new <code>Buffer</code> with. | |
<strong>Default:</strong> <code>0</code>.</li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> If <code>fill</code> is a string, this is its encoding. | |
<strong>Default:</strong> <code>'utf8'</code>.</li> | |
@@ -5350,7 +5340,7 @@ | |
// Prints: <Buffer 00 00 00 00 00> | |
</code></pre> | |
<p>Allocates a new <code>Buffer</code> of <code>size</code> bytes. If <code>size</code> is larger than | |
-<a href="#buffer_buffer_constants_max_length"><code>buffer.constants.MAX_LENGTH</code></a> or smaller than 0, <a href="errors.html#ERR_INVALID_OPT_VALUE"><code>ERR_INVALID_OPT_VALUE</code></a> is | |
+<a href="#buffer_buffer_constants_max_length"><code>buffer.constants.MAX_LENGTH</code></a> or smaller than 0, <a href="#ERR_INVALID_OPT_VALUE"><code>ERR_INVALID_OPT_VALUE</code></a> is | |
thrown. A zero-length <code>Buffer</code> is created if <code>size</code> is 0.</p> | |
<p>If <code>fill</code> is specified, the allocated <code>Buffer</code> will be initialized by calling | |
<a href="#buffer_buf_fill_value_offset_end_encoding"><code>buf.fill(fill)</code></a>.</p> | |
@@ -5387,7 +5377,7 @@ | |
<li><code>size</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> The desired length of the new <code>Buffer</code>.</li> | |
</ul> | |
<p>Allocates a new <code>Buffer</code> of <code>size</code> bytes. If <code>size</code> is larger than | |
-<a href="#buffer_buffer_constants_max_length"><code>buffer.constants.MAX_LENGTH</code></a> or smaller than 0, <a href="errors.html#ERR_INVALID_OPT_VALUE"><code>ERR_INVALID_OPT_VALUE</code></a> is | |
+<a href="#buffer_buffer_constants_max_length"><code>buffer.constants.MAX_LENGTH</code></a> or smaller than 0, <a href="#ERR_INVALID_OPT_VALUE"><code>ERR_INVALID_OPT_VALUE</code></a> is | |
thrown. A zero-length <code>Buffer</code> is created if <code>size</code> is 0.</p> | |
<p>The underlying memory for <code>Buffer</code> instances created in this way is <em>not | |
initialized</em>. The contents of the newly created <code>Buffer</code> are unknown and | |
@@ -5423,7 +5413,7 @@ | |
<li><code>size</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> The desired length of the new <code>Buffer</code>.</li> | |
</ul> | |
<p>Allocates a new <code>Buffer</code> of <code>size</code> bytes. If <code>size</code> is larger than | |
-<a href="#buffer_buffer_constants_max_length"><code>buffer.constants.MAX_LENGTH</code></a> or smaller than 0, <a href="errors.html#ERR_INVALID_OPT_VALUE"><code>ERR_INVALID_OPT_VALUE</code></a> is | |
+<a href="#buffer_buffer_constants_max_length"><code>buffer.constants.MAX_LENGTH</code></a> or smaller than 0, <a href="#ERR_INVALID_OPT_VALUE"><code>ERR_INVALID_OPT_VALUE</code></a> is | |
thrown. A zero-length <code>Buffer</code> is created if <code>size</code> is 0.</p> | |
<p>The underlying memory for <code>Buffer</code> instances created in this way is <em>not | |
initialized</em>. The contents of the newly created <code>Buffer</code> are unknown and | |
@@ -5474,7 +5464,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>string</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer" class="type"><ArrayBuffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer" class="type"><SharedArrayBuffer></a> A | |
+<li><code>string</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer" class="type"><ArrayBuffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer" class="type"><SharedArrayBuffer></a> A | |
value to calculate the length of.</li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> If <code>string</code> is a string, this is its encoding. | |
<strong>Default:</strong> <code>'utf8'</code>.</li> | |
@@ -5508,8 +5498,8 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>buf1</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
-<li><code>buf2</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
+<li><code>buf1</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
+<li><code>buf2</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
</ul> | |
<p>Compares <code>buf1</code> to <code>buf2</code> typically for the purpose of sorting arrays of | |
@@ -5537,11 +5527,11 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>list</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer[]></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array[]></a> List of <code>Buffer</code> or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"><code>Uint8Array</code></a> instances | |
+<li><code>list</code> <a href="#buffer_class_buffer" class="type"><Buffer[]></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array[]></a> List of <code>Buffer</code> or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"><code>Uint8Array</code></a> instances | |
to concat.</li> | |
<li><code>totalLength</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> Total length of the <code>Buffer</code> instances in <code>list</code> | |
when concatenated.</li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
<p>Returns a new <code>Buffer</code> which is the result of concatenating all the <code>Buffer</code> | |
instances in the <code>list</code> together.</p> | |
@@ -5627,7 +5617,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v5.10.0</span> | |
</div><ul> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> An existing <code>Buffer</code> or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"><code>Uint8Array</code></a> from which | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> An existing <code>Buffer</code> or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"><code>Uint8Array</code></a> from which | |
to copy data.</li> | |
</ul> | |
<p>Copies the passed <code>buffer</code> data onto a new <code>Buffer</code> instance.</p> | |
@@ -5763,7 +5753,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>target</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> A <code>Buffer</code> or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"><code>Uint8Array</code></a> with which to | |
+<li><code>target</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> A <code>Buffer</code> or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"><code>Uint8Array</code></a> with which to | |
compare <code>buf</code>.</li> | |
<li><code>targetStart</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> The offset within <code>target</code> at which to begin | |
comparison. <strong>Default:</strong> <code>0</code>.</li> | |
@@ -5814,13 +5804,13 @@ | |
console.log(buf1.compare(buf2, 5, 6, 5)); | |
// Prints: 1 | |
</code></pre> | |
-<p><a href="errors.html#ERR_INDEX_OUT_OF_RANGE"><code>ERR_INDEX_OUT_OF_RANGE</code></a> is thrown if <code>targetStart < 0</code>, <code>sourceStart < 0</code>, | |
+<p><a href="#ERR_INDEX_OUT_OF_RANGE"><code>ERR_INDEX_OUT_OF_RANGE</code></a> is thrown if <code>targetStart < 0</code>, <code>sourceStart < 0</code>, | |
<code>targetEnd > target.byteLength</code>, or <code>sourceEnd > source.byteLength</code>.</p> | |
<h3>buf.copy(target[, targetStart[, sourceStart[, sourceEnd]]])<span><a class="mark" href="#buffer_buf_copy_target_targetstart_sourcestart_sourceend" id="buffer_buf_copy_target_targetstart_sourcestart_sourceend">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.90</span> | |
</div><ul> | |
-<li><code>target</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> A <code>Buffer</code> or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"><code>Uint8Array</code></a> to copy into.</li> | |
+<li><code>target</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> A <code>Buffer</code> or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"><code>Uint8Array</code></a> to copy into.</li> | |
<li><code>targetStart</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> The offset within <code>target</code> at which to begin | |
writing. <strong>Default:</strong> <code>0</code>.</li> | |
<li><code>sourceStart</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> The offset within <code>buf</code> from which to begin copying. | |
@@ -5898,7 +5888,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>otherBuffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> A <code>Buffer</code> or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"><code>Uint8Array</code></a> with which to compare | |
+<li><code>otherBuffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> A <code>Buffer</code> or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"><code>Uint8Array</code></a> with which to compare | |
<code>buf</code>.</li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
</ul> | |
@@ -5936,14 +5926,14 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>value</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> The value with which to fill <code>buf</code>.</li> | |
+<li><code>value</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> The value with which to fill <code>buf</code>.</li> | |
<li><code>offset</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> Number of bytes to skip before starting to fill <code>buf</code>. | |
<strong>Default:</strong> <code>0</code>.</li> | |
<li><code>end</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> Where to stop filling <code>buf</code> (not inclusive). <strong>Default:</strong> | |
<a href="#buffer_buf_length"><code>buf.length</code></a>.</li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The encoding for <code>value</code> if <code>value</code> is a string. | |
<strong>Default:</strong> <code>'utf8'</code>.</li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> A reference to <code>buf</code>.</li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> A reference to <code>buf</code>.</li> | |
</ul> | |
<p>Fills <code>buf</code> with the specified <code>value</code>. If the <code>offset</code> and <code>end</code> are not given, | |
the entire <code>buf</code> will be filled:</p> | |
@@ -5977,7 +5967,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v5.3.0</span> | |
</div><ul> | |
-<li><code>value</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> What to search for.</li> | |
+<li><code>value</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> What to search for.</li> | |
<li><code>byteOffset</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> Where to begin searching in <code>buf</code>. <strong>Default:</strong> <code>0</code>.</li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> If <code>value</code> is a string, this is its encoding. | |
<strong>Default:</strong> <code>'utf8'</code>.</li> | |
@@ -6018,7 +6008,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>value</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> What to search for.</li> | |
+<li><code>value</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> What to search for.</li> | |
<li><code>byteOffset</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> Where to begin searching in <code>buf</code>. <strong>Default:</strong> <code>0</code>.</li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> If <code>value</code> is a string, this is the encoding used to | |
determine the binary representation of the string that will be searched for in | |
@@ -6114,7 +6104,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>value</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> What to search for.</li> | |
+<li><code>value</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> What to search for.</li> | |
<li><code>byteOffset</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> Where to begin searching in <code>buf</code>. | |
<strong>Default:</strong> <a href="#buffer_buf_length"><code>buf.length</code></a><code>- 1</code>.</li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> If <code>value</code> is a string, this is the encoding used to | |
@@ -6212,7 +6202,7 @@ | |
<h3>buf.parent<span><a class="mark" href="#buffer_buf_parent" id="buffer_buf_parent">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Deprecated since: v8.0.0</span> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#buffer_buf_buffer"><code>buf.buffer</code></a> instead.</div><p>The <code>buf.parent</code> property is a deprecated alias for <code>buf.buffer</code>.</p> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#buffer_buf_buffer"><code>buf.buffer</code></a> instead.</div><p>The <code>buf.parent</code> property is a deprecated alias for <code>buf.buffer</code>.</p> | |
<h3>buf.readDoubleBE(offset)<span><a class="mark" href="#buffer_buf_readdoublebe_offset" id="buffer_buf_readdoublebe_offset">#</a></span></h3> | |
<h3>buf.readDoubleLE(offset)<span><a class="mark" href="#buffer_buf_readdoublele_offset" id="buffer_buf_readdoublele_offset">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -6550,7 +6540,7 @@ | |
<li><code>start</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> Where the new <code>Buffer</code> will start. <strong>Default:</strong> <code>0</code>.</li> | |
<li><code>end</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> Where the new <code>Buffer</code> will end (not inclusive). | |
<strong>Default:</strong> <a href="#buffer_buf_length"><code>buf.length</code></a>.</li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
<p>Returns a new <code>Buffer</code> that references the same memory as the original, but | |
offset and cropped by the <code>start</code> and <code>end</code> indices.</p> | |
@@ -6598,10 +6588,10 @@ | |
<div class="api_metadata"> | |
<span>Added in: v5.10.0</span> | |
</div><ul> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> A reference to <code>buf</code>.</li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> A reference to <code>buf</code>.</li> | |
</ul> | |
<p>Interprets <code>buf</code> as an array of unsigned 16-bit integers and swaps the | |
-byte order <em>in-place</em>. Throws <a href="errors.html#ERR_INVALID_BUFFER_SIZE"><code>ERR_INVALID_BUFFER_SIZE</code></a> if <a href="#buffer_buf_length"><code>buf.length</code></a> is | |
+byte order <em>in-place</em>. Throws <a href="#ERR_INVALID_BUFFER_SIZE"><code>ERR_INVALID_BUFFER_SIZE</code></a> if <a href="#buffer_buf_length"><code>buf.length</code></a> is | |
not a multiple of 2.</p> | |
<pre><code class="lang-js">const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); | |
@@ -6622,10 +6612,10 @@ | |
<div class="api_metadata"> | |
<span>Added in: v5.10.0</span> | |
</div><ul> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> A reference to <code>buf</code>.</li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> A reference to <code>buf</code>.</li> | |
</ul> | |
<p>Interprets <code>buf</code> as an array of unsigned 32-bit integers and swaps the | |
-byte order <em>in-place</em>. Throws <a href="errors.html#ERR_INVALID_BUFFER_SIZE"><code>ERR_INVALID_BUFFER_SIZE</code></a> if <a href="#buffer_buf_length"><code>buf.length</code></a> is | |
+byte order <em>in-place</em>. Throws <a href="#ERR_INVALID_BUFFER_SIZE"><code>ERR_INVALID_BUFFER_SIZE</code></a> if <a href="#buffer_buf_length"><code>buf.length</code></a> is | |
not a multiple of 4.</p> | |
<pre><code class="lang-js">const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); | |
@@ -6646,10 +6636,10 @@ | |
<div class="api_metadata"> | |
<span>Added in: v6.3.0</span> | |
</div><ul> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> A reference to <code>buf</code>.</li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> A reference to <code>buf</code>.</li> | |
</ul> | |
<p>Interprets <code>buf</code> as an array of 64-bit numbers and swaps byte order <em>in-place</em>. | |
-Throws <a href="errors.html#ERR_INVALID_BUFFER_SIZE"><code>ERR_INVALID_BUFFER_SIZE</code></a> if <a href="#buffer_buf_length"><code>buf.length</code></a> is not a multiple of 8.</p> | |
+Throws <a href="#ERR_INVALID_BUFFER_SIZE"><code>ERR_INVALID_BUFFER_SIZE</code></a> if <a href="#buffer_buf_length"><code>buf.length</code></a> is not a multiple of 8.</p> | |
<pre><code class="lang-js">const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); | |
console.log(buf1); | |
@@ -7163,7 +7153,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>source</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> A <code>Buffer</code> or <code>Uint8Array</code> instance.</li> | |
+<li><code>source</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> A <code>Buffer</code> or <code>Uint8Array</code> instance.</li> | |
<li><code>fromEnc</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The current encoding.</li> | |
<li><code>toEnc</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> To target encoding.</li> | |
</ul> | |
@@ -7186,7 +7176,7 @@ | |
<h2>Class: SlowBuffer<span><a class="mark" href="#buffer_class_slowbuffer" id="buffer_class_slowbuffer">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Deprecated since: v6.0.0</span> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#buffer_class_method_buffer_allocunsafeslow_size"><code>Buffer.allocUnsafeSlow()</code></a> instead.</div><p>Returns an un-pooled <code>Buffer</code>.</p> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#buffer_class_method_buffer_allocunsafeslow_size"><code>Buffer.allocUnsafeSlow()</code></a> instead.</div><p>Returns an un-pooled <code>Buffer</code>.</p> | |
<p>In order to avoid the garbage collection overhead of creating many individually | |
allocated <code>Buffer</code> instances, by default allocations under 4KB are sliced from a | |
single larger allocated object.</p> | |
@@ -7213,11 +7203,11 @@ | |
<h3>new SlowBuffer(size)<span><a class="mark" href="#buffer_new_slowbuffer_size" id="buffer_new_slowbuffer_size">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Deprecated since: v6.0.0</span> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#buffer_class_method_buffer_allocunsafeslow_size"><code>Buffer.allocUnsafeSlow()</code></a> instead.</div><ul> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#buffer_class_method_buffer_allocunsafeslow_size"><code>Buffer.allocUnsafeSlow()</code></a> instead.</div><ul> | |
<li><code>size</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> The desired length of the new <code>SlowBuffer</code>.</li> | |
</ul> | |
<p>Allocates a new <code>Buffer</code> of <code>size</code> bytes. If <code>size</code> is larger than | |
-<a href="#buffer_buffer_constants_max_length"><code>buffer.constants.MAX_LENGTH</code></a> or smaller than 0, <a href="errors.html#ERR_INVALID_OPT_VALUE"><code>ERR_INVALID_OPT_VALUE</code></a> is | |
+<a href="#buffer_buffer_constants_max_length"><code>buffer.constants.MAX_LENGTH</code></a> or smaller than 0, <a href="#ERR_INVALID_OPT_VALUE"><code>ERR_INVALID_OPT_VALUE</code></a> is | |
thrown. A zero-length <code>Buffer</code> is created if <code>size</code> is 0.</p> | |
<p>The underlying memory for <code>SlowBuffer</code> instances is <em>not initialized</em>. The | |
contents of a newly created <code>SlowBuffer</code> are unknown and may contain sensitive | |
@@ -7258,13 +7248,11 @@ | |
<p>Represents the largest <code>length</code> that a <code>string</code> primitive can have, counted | |
in UTF-16 code units.</p> | |
<p>This value may depend on the JS engine that is being used.</p> | |
-<!-- [end-include:buffer.md] --> | |
-<!-- [start-include:addons.md] --> | |
<h1>C++ Addons<span><a class="mark" href="#addons_c_addons" id="addons_c_addons">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
<!-- type=misc --> | |
<p>Node.js Addons are dynamically-linked shared objects, written in C++, that | |
-can be loaded into Node.js using the <a href="modules.html#modules_require"><code>require()</code></a> function, and used | |
+can be loaded into Node.js using the <a href="#modules_require"><code>require()</code></a> function, and used | |
just as if they were an ordinary Node.js module. They are used primarily to | |
provide an interface between JavaScript running in Node.js and C/C++ libraries.</p> | |
<p>At the moment, the method for implementing Addons is rather complicated, | |
@@ -7376,7 +7364,7 @@ | |
version of <code>node-gyp</code> to perform this same set of actions, generating a | |
compiled version of the Addon for the user's platform on demand.</p> | |
<p>Once built, the binary Addon can be used from within Node.js by pointing | |
-<a href="modules.html#modules_require"><code>require()</code></a> to the built <code>addon.node</code> module:</p> | |
+<a href="#modules_require"><code>require()</code></a> to the built <code>addon.node</code> module:</p> | |
<pre><code class="lang-js">// hello.js | |
const addon = require('./build/Release/addon'); | |
@@ -7418,15 +7406,15 @@ | |
</ul> | |
<h3>Loading Addons using require()<span><a class="mark" href="#addons_loading_addons_using_require" id="addons_loading_addons_using_require">#</a></span></h3> | |
<p>The filename extension of the compiled Addon binary is <code>.node</code> (as opposed | |
-to <code>.dll</code> or <code>.so</code>). The <a href="modules.html#modules_require"><code>require()</code></a> function is written to look for | |
+to <code>.dll</code> or <code>.so</code>). The <a href="#modules_require"><code>require()</code></a> function is written to look for | |
files with the <code>.node</code> file extension and initialize those as dynamically-linked | |
libraries.</p> | |
-<p>When calling <a href="modules.html#modules_require"><code>require()</code></a>, the <code>.node</code> extension can usually be | |
+<p>When calling <a href="#modules_require"><code>require()</code></a>, the <code>.node</code> extension can usually be | |
omitted and Node.js will still find and initialize the Addon. One caveat, | |
however, is that Node.js will first attempt to locate and load modules or | |
JavaScript files that happen to share the same base name. For instance, if | |
there is a file <code>addon.js</code> in the same directory as the binary <code>addon.node</code>, | |
-then <a href="modules.html#modules_require"><code>require('addon')</code></a> will give precedence to the <code>addon.js</code> file | |
+then <a href="#modules_require"><code>require('addon')</code></a> will give precedence to the <code>addon.js</code> file | |
and load it instead.</p> | |
<h2>Native Abstractions for Node.js<span><a class="mark" href="#addons_native_abstractions_for_node_js" id="addons_native_abstractions_for_node_js">#</a></span></h2> | |
<p>Each of the examples illustrated in this document make direct use of the | |
@@ -7442,7 +7430,7 @@ | |
future releases of V8 and Node.js. See the <code>nan</code> <a href="https://github.com/nodejs/nan/tree/master/examples/">examples</a> for an | |
illustration of how it can be used.</p> | |
<h2>N-API<span><a class="mark" href="#addons_n_api" id="addons_n_api">#</a></span></h2> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>N-API is an API for building native Addons. It is independent from | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>N-API is an API for building native Addons. It is independent from | |
the underlying JavaScript runtime (e.g. V8) and is maintained as part of | |
Node.js itself. This API will be Application Binary Interface (ABI) stable | |
across versions of Node.js. It is intended to insulate Addons from | |
@@ -8277,12 +8265,10 @@ | |
<pre><code class="lang-js">// test.js | |
require('./build/Release/addon'); | |
</code></pre> | |
-<!-- [end-include:addons.md] --> | |
-<!-- [start-include:n-api.md] --> | |
<h1>N-API<span><a class="mark" href="#n_api_n_api" id="n_api_n_api">#</a></span></h1> | |
<!--introduced_in=v7.10.0--> | |
<!-- type=misc --> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>N-API (pronounced N as in the letter, followed by API) | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>N-API (pronounced N as in the letter, followed by API) | |
is an API for building native Addons. It is independent from | |
the underlying JavaScript runtime (ex V8) and is maintained as part of | |
Node.js itself. This API will be Application Binary Interface (ABI) stable | |
@@ -8382,11 +8368,11 @@ | |
<h3>napi_value<span><a class="mark" href="#n_api_napi_value" id="n_api_napi_value">#</a></span></h3> | |
<p>This is an opaque pointer that is used to represent a JavaScript value.</p> | |
<h3>napi_threadsafe_function<span><a class="mark" href="#n_api_napi_threadsafe_function" id="n_api_napi_threadsafe_function">#</a></span></h3> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>This is an opaque pointer that represents a JavaScript function which can be | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>This is an opaque pointer that represents a JavaScript function which can be | |
called asynchronously from multiple threads via | |
<code>napi_call_threadsafe_function()</code>.</p> | |
<h3>napi_threadsafe_function_release_mode<span><a class="mark" href="#n_api_napi_threadsafe_function_release_mode" id="n_api_napi_threadsafe_function_release_mode">#</a></span></h3> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>A value to be given to <code>napi_release_threadsafe_function()</code> to indicate whether | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>A value to be given to <code>napi_release_threadsafe_function()</code> to indicate whether | |
the thread-safe function is to be closed immediately (<code>napi_tsfn_abort</code>) or | |
merely released (<code>napi_tsfn_release</code>) and thus available for subsequent use via | |
<code>napi_acquire_threadsafe_function()</code> and <code>napi_call_threadsafe_function()</code>.</p> | |
@@ -8396,7 +8382,7 @@ | |
} napi_threadsafe_function_release_mode; | |
</code></pre> | |
<h3>napi_threadsafe_function_call_mode<span><a class="mark" href="#n_api_napi_threadsafe_function_call_mode" id="n_api_napi_threadsafe_function_call_mode">#</a></span></h3> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>A value to be given to <code>napi_call_threadsafe_function()</code> to indicate whether | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>A value to be given to <code>napi_call_threadsafe_function()</code> to indicate whether | |
the call should block whenever the queue associated with the thread-safe | |
function is full.</p> | |
<pre><code class="lang-C">typedef enum { | |
@@ -8467,7 +8453,7 @@ | |
void* data); | |
</code></pre> | |
<h4>napi_threadsafe_function_call_js<span><a class="mark" href="#n_api_napi_threadsafe_function_call_js" id="n_api_napi_threadsafe_function_call_js">#</a></span></h4> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>Function pointer used with asynchronous thread-safe function calls. The callback | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>Function pointer used with asynchronous thread-safe function calls. The callback | |
will be called on the main thread. Its purpose is to use a data item arriving | |
via the queue from one of the secondary threads to construct the parameters | |
necessary for a call into JavaScript, usually via <code>napi_call_function</code>, and then | |
@@ -11123,7 +11109,7 @@ | |
<ul> | |
<li><code>[in] env</code>: The environment that the API is invoked under.</li> | |
<li><code>[in] async_resource</code>: An optional object associated with the async work | |
-that will be passed to possible <code>async_hooks</code> <a href="async_hooks.html#async_hooks_init_asyncid_type_triggerasyncid_resource"><code>init</code> hooks</a>.</li> | |
+that will be passed to possible <code>async_hooks</code> <a href="#async_hooks_init_asyncid_type_triggerasyncid_resource"><code>init</code> hooks</a>.</li> | |
<li><code>[in] async_resource_name</code>: Identifier for the kind of resource that is | |
being provided for diagnostic information exposed by the <code>async_hooks</code> API.</li> | |
<li><code>[in] execute</code>: The native function which should be called to execute | |
@@ -11145,7 +11131,7 @@ | |
<p>The <code>async_resource_name</code> identifier is provided by the user and should be | |
representative of the type of async work being performed. It is also recommended | |
to apply namespacing to the identifier, e.g. by including the module name. See | |
-the <a href="async_hooks.html#async_hooks_type"><code>async_hooks</code> documentation</a> for more information.</p> | |
+the <a href="#async_hooks_type"><code>async_hooks</code> documentation</a> for more information.</p> | |
<h3>napi_delete_async_work<span><a class="mark" href="#n_api_napi_delete_async_work" id="n_api_napi_delete_async_work">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v8.0.0</span> | |
@@ -11206,7 +11192,7 @@ | |
<ul> | |
<li><code>[in] env</code>: The environment that the API is invoked under.</li> | |
<li><code>[in] async_resource</code>: An optional object associated with the async work | |
-that will be passed to possible <code>async_hooks</code> <a href="async_hooks.html#async_hooks_init_asyncid_type_triggerasyncid_resource"><code>init</code> hooks</a>.</li> | |
+that will be passed to possible <code>async_hooks</code> <a href="#async_hooks_init_asyncid_type_triggerasyncid_resource"><code>init</code> hooks</a>.</li> | |
<li><code>[in] async_resource_name</code>: Identifier for the kind of resource | |
that is being provided for diagnostic information exposed by the | |
<code>async_hooks</code> API.</li> | |
@@ -11284,7 +11270,7 @@ | |
<ul> | |
<li><code>[in] env</code>: The environment that the API is invoked under.</li> | |
<li><code>[in] resource_object</code>: An optional object associated with the async work | |
-that will be passed to possible <code>async_hooks</code> <a href="async_hooks.html#async_hooks_init_asyncid_type_triggerasyncid_resource"><code>init</code> hooks</a>.</li> | |
+that will be passed to possible <code>async_hooks</code> <a href="#async_hooks_init_asyncid_type_triggerasyncid_resource"><code>init</code> hooks</a>.</li> | |
<li><code>[in] context</code>: Context for the async operation that is | |
invoking the callback. This should be a value previously obtained | |
from <a href="#n_api_napi_async_init"><code>napi_async_init</code></a>.</li> | |
@@ -11328,7 +11314,7 @@ | |
<p>Returns <code>napi_ok</code> if the API succeeded.</p> | |
<p>This function fills the <code>version</code> struct with the major, minor, and patch | |
version of Node.js that is currently running, and the <code>release</code> field with the | |
-value of <a href="process.html#process_process_release"><code>process.release.name</code></a>.</p> | |
+value of <a href="#process_process_release"><code>process.release.name</code></a>.</p> | |
<p>The returned buffer is statically allocated and does not need to be freed.</p> | |
<h3>napi_get_version<span><a class="mark" href="#n_api_napi_get_version" id="n_api_napi_get_version">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -11523,7 +11509,7 @@ | |
<!-- it's very convenient to have all the anchors indexed --> | |
<!--lint disable no-unused-definitions remark-lint--> | |
<h2>Asynchronous Thread-safe Function Calls<span><a class="mark" href="#n_api_asynchronous_thread_safe_function_calls" id="n_api_asynchronous_thread_safe_function_calls">#</a></span></h2> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>JavaScript functions can normally only be called from a native addon's main | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>JavaScript functions can normally only be called from a native addon's main | |
thread. If an addon creates additional threads, then N-API functions that | |
require a <code>napi_env</code>, <code>napi_value</code>, or <code>napi_ref</code> must not be called from those | |
threads.</p> | |
@@ -11615,7 +11601,7 @@ | |
prevent the event loop from exiting. The APIs <code>napi_ref_threadsafe_function</code> and | |
<code>napi_unref_threadsafe_function</code> exist for this purpose.</p> | |
<h3>napi_create_threadsafe_function<span><a class="mark" href="#n_api_napi_create_threadsafe_function" id="n_api_napi_create_threadsafe_function">#</a></span></h3> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><div class="api_metadata"> | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><div class="api_metadata"> | |
<span>Added in: REPLACEME</span> | |
</div><pre><code class="lang-C">NAPI_EXTERN napi_status | |
napi_create_threadsafe_function(napi_env env, | |
@@ -11634,7 +11620,7 @@ | |
<li><code>[in] env</code>: The environment that the API is invoked under.</li> | |
<li><code>[in] func</code>: The JavaScript function to call from another thread.</li> | |
<li><code>[in] async_resource</code>: An optional object associated with the async work that | |
-will be passed to possible <code>async_hooks</code> <a href="async_hooks.html#async_hooks_init_asyncid_type_triggerasyncid_resource"><code>init</code> hooks</a>.</li> | |
+will be passed to possible <code>async_hooks</code> <a href="#async_hooks_init_asyncid_type_triggerasyncid_resource"><code>init</code> hooks</a>.</li> | |
<li><code>[in] async_resource_name</code>: A javaScript string to provide an identifier for | |
the kind of resource that is being provided for diagnostic information exposed | |
by the <code>async_hooks</code> API.</li> | |
@@ -11653,7 +11639,7 @@ | |
<li><code>[out] result</code>: The asynchronous thread-safe JavaScript function.</li> | |
</ul> | |
<h3>napi_get_threadsafe_function_context<span><a class="mark" href="#n_api_napi_get_threadsafe_function_context" id="n_api_napi_get_threadsafe_function_context">#</a></span></h3> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><div class="api_metadata"> | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><div class="api_metadata"> | |
<span>Added in: REPLACEME</span> | |
</div><pre><code class="lang-C">NAPI_EXTERN napi_status | |
napi_get_threadsafe_function_context(napi_threadsafe_function func, | |
@@ -11665,7 +11651,7 @@ | |
</ul> | |
<p>This API may be called from any thread which makes use of <code>func</code>.</p> | |
<h3>napi_call_threadsafe_function<span><a class="mark" href="#n_api_napi_call_threadsafe_function" id="n_api_napi_call_threadsafe_function">#</a></span></h3> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><div class="api_metadata"> | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><div class="api_metadata"> | |
<span>Added in: REPLACEME</span> | |
</div><pre><code class="lang-C">NAPI_EXTERN napi_status | |
napi_call_threadsafe_function(napi_threadsafe_function func, | |
@@ -11686,7 +11672,7 @@ | |
added to the queue if the API returns <code>napi_ok</code>.</p> | |
<p>This API may be called from any thread which makes use of <code>func</code>.</p> | |
<h3>napi_acquire_threadsafe_function<span><a class="mark" href="#n_api_napi_acquire_threadsafe_function" id="n_api_napi_acquire_threadsafe_function">#</a></span></h3> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><div class="api_metadata"> | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><div class="api_metadata"> | |
<span>Added in: REPLACEME</span> | |
</div><pre><code class="lang-C">NAPI_EXTERN napi_status | |
napi_acquire_threadsafe_function(napi_threadsafe_function func); | |
@@ -11701,7 +11687,7 @@ | |
it.</p> | |
<p>This API may be called from any thread which will start making use of <code>func</code>.</p> | |
<h3>napi_release_threadsafe_function<span><a class="mark" href="#n_api_napi_release_threadsafe_function" id="n_api_napi_release_threadsafe_function">#</a></span></h3> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><div class="api_metadata"> | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><div class="api_metadata"> | |
<span>Added in: REPLACEME</span> | |
</div><pre><code class="lang-C">NAPI_EXTERN napi_status | |
napi_release_threadsafe_function(napi_threadsafe_function func, | |
@@ -11722,7 +11708,7 @@ | |
<code>func</code> may have been destroyed.</p> | |
<p>This API may be called from any thread which will stop making use of <code>func</code>.</p> | |
<h3>napi_ref_threadsafe_function<span><a class="mark" href="#n_api_napi_ref_threadsafe_function" id="n_api_napi_ref_threadsafe_function">#</a></span></h3> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><div class="api_metadata"> | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><div class="api_metadata"> | |
<span>Added in: REPLACEME</span> | |
</div><pre><code class="lang-C">NAPI_EXTERN napi_status | |
napi_ref_threadsafe_function(napi_env env, napi_threadsafe_function func); | |
@@ -11736,7 +11722,7 @@ | |
also idempotent.</p> | |
<p>This API may only be called from the main thread.</p> | |
<h3>napi_unref_threadsafe_function<span><a class="mark" href="#n_api_napi_unref_threadsafe_function" id="n_api_napi_unref_threadsafe_function">#</a></span></h3> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><div class="api_metadata"> | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><div class="api_metadata"> | |
<span>Added in: REPLACEME</span> | |
</div><pre><code class="lang-C">NAPI_EXTERN napi_status | |
napi_unref_threadsafe_function(napi_env env, napi_threadsafe_function func); | |
@@ -11749,12 +11735,10 @@ | |
may exit before <code>func</code> is destroyed. Similar to <a href="http://docs.libuv.org/en/v1.x/handle.html#c.uv_unref"><code>uv_unref</code></a> it is also | |
idempotent.</p> | |
<p>This API may only be called from the main thread.</p> | |
-<!-- [end-include:n-api.md] --> | |
-<!-- [start-include:child_process.md] --> | |
<h1>Child Process<span><a class="mark" href="#child_process_child_process" id="child_process_child_process">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
<!--lint disable maximum-line-length--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>child_process</code> module provides the ability to spawn child processes in | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>child_process</code> module provides the ability to spawn child processes in | |
a manner that is similar, but not identical, to <a href="http://man7.org/linux/man-pages/man3/popen.3.html"><code>popen(3)</code></a>. This capability | |
is primarily provided by the <a href="#child_process_child_process_spawn_command_args_options"><code>child_process.spawn()</code></a> function:</p> | |
<pre><code class="lang-js">const { spawn } = require('child_process'); | |
@@ -11792,7 +11776,7 @@ | |
passing the <code>stdout</code> and <code>stderr</code> to a callback function when complete.</li> | |
<li><a href="#child_process_child_process_execfile_file_args_options_callback"><code>child_process.execFile()</code></a>: similar to <a href="#child_process_child_process_exec_command_options_callback"><code>child_process.exec()</code></a> except that | |
it spawns the command directly without first spawning a shell by default.</li> | |
-<li><a href="child_process.html#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>: spawns a new Node.js process and invokes a | |
+<li><a href="#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>: spawns a new Node.js process and invokes a | |
specified module with an IPC communication channel established that allows | |
sending messages between parent and child.</li> | |
<li><a href="#child_process_child_process_execsync_command_options"><code>child_process.execSync()</code></a>: a synchronous version of | |
@@ -11805,11 +11789,11 @@ | |
the synchronous methods can have significant impact on performance due to | |
stalling the event loop while spawned processes complete.</p> | |
<h2>Asynchronous Process Creation<span><a class="mark" href="#child_process_asynchronous_process_creation" id="child_process_asynchronous_process_creation">#</a></span></h2> | |
-<p>The <a href="#child_process_child_process_spawn_command_args_options"><code>child_process.spawn()</code></a>, <a href="child_process.html#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>, <a href="#child_process_child_process_exec_command_options_callback"><code>child_process.exec()</code></a>, | |
+<p>The <a href="#child_process_child_process_spawn_command_args_options"><code>child_process.spawn()</code></a>, <a href="#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>, <a href="#child_process_child_process_exec_command_options_callback"><code>child_process.exec()</code></a>, | |
and <a href="#child_process_child_process_execfile_file_args_options_callback"><code>child_process.execFile()</code></a> methods all follow the idiomatic asynchronous | |
programming pattern typical of other Node.js APIs.</p> | |
-<p>Each of the methods returns a <a href="child_process.html#child_process_class_childprocess"><code>ChildProcess</code></a> instance. These objects | |
-implement the Node.js <a href="events.html"><code>EventEmitter</code></a> API, allowing the parent process to | |
+<p>Each of the methods returns a <a href="#child_process_child_process"><code>ChildProcess</code></a> instance. These objects | |
+implement the Node.js <a href="#events_class_eventemitter"><code>EventEmitter</code></a> API, allowing the parent process to | |
register listener functions that are called when certain events occur during | |
the life cycle of the child process.</p> | |
<p>The <a href="#child_process_child_process_exec_command_options_callback"><code>child_process.exec()</code></a> and <a href="#child_process_child_process_execfile_file_args_options_callback"><code>child_process.execFile()</code></a> methods additionally | |
@@ -11899,11 +11883,11 @@ | |
</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> called with the output when process terminates.<ul> | |
<li><code>error</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
-<li><code>stdout</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
-<li><code>stderr</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>stdout</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>stderr</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="child_process.html#child_process_class_childprocess" class="type"><ChildProcess></a></li> | |
+<li>Returns: <a href="#child_process_class_childprocess" class="type"><ChildProcess></a></li> | |
</ul> | |
<p>Spawns a shell then executes the <code>command</code> within that shell, buffering any | |
generated output. The <code>command</code> string passed to the exec function is processed | |
@@ -11921,7 +11905,7 @@ | |
metacharacters may be used to trigger arbitrary command execution.</strong></p> | |
<p>If a <code>callback</code> function is provided, it is called with the arguments | |
<code>(error, stdout, stderr)</code>. On success, <code>error</code> will be <code>null</code>. On error, | |
-<code>error</code> will be an instance of <a href="errors.html#errors_class_error"><code>Error</code></a>. The <code>error.code</code> property will be | |
+<code>error</code> will be an instance of <a href="#errors_class_error"><code>Error</code></a>. The <code>error.code</code> property will be | |
the exit code of the child process while <code>error.signal</code> will be set to the | |
signal that terminated the process. Any exit code other than <code>0</code> is considered | |
to be an error.</p> | |
@@ -12003,11 +11987,11 @@ | |
</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Called with the output when process terminates.<ul> | |
<li><code>error</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
-<li><code>stdout</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
-<li><code>stderr</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>stdout</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>stderr</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="child_process.html#child_process_class_childprocess" class="type"><ChildProcess></a></li> | |
+<li>Returns: <a href="#child_process_class_childprocess" class="type"><ChildProcess></a></li> | |
</ul> | |
<p>The <code>child_process.execFile()</code> function is similar to <a href="#child_process_child_process_exec_command_options_callback"><code>child_process.exec()</code></a> | |
except that it does not spawn a shell by default. Rather, the specified executable <code>file</code> | |
@@ -12084,14 +12068,14 @@ | |
<li><code>gid</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Sets the group identity of the process (see <a href="http://man7.org/linux/man-pages/man2/setgid.2.html"><code>setgid(2)</code></a>).</li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="child_process.html#child_process_class_childprocess" class="type"><ChildProcess></a></li> | |
+<li>Returns: <a href="#child_process_class_childprocess" class="type"><ChildProcess></a></li> | |
</ul> | |
<p>The <code>child_process.fork()</code> method is a special case of | |
<a href="#child_process_child_process_spawn_command_args_options"><code>child_process.spawn()</code></a> used specifically to spawn new Node.js processes. | |
-Like <a href="#child_process_child_process_spawn_command_args_options"><code>child_process.spawn()</code></a>, a <a href="child_process.html#child_process_class_childprocess"><code>ChildProcess</code></a> object is returned. The returned | |
-<a href="child_process.html#child_process_class_childprocess"><code>ChildProcess</code></a> will have an additional communication channel built-in that | |
+Like <a href="#child_process_child_process_spawn_command_args_options"><code>child_process.spawn()</code></a>, a <a href="#child_process_child_process"><code>ChildProcess</code></a> object is returned. The returned | |
+<a href="#child_process_child_process"><code>ChildProcess</code></a> will have an additional communication channel built-in that | |
allows messages to be passed back and forth between the parent and child. See | |
-<a href="child_process.html#child_process_subprocess_send_message_sendhandle_options_callback"><code>subprocess.send()</code></a> for details.</p> | |
+<a href="#child_process_subprocess_send_message_sendhandle_options_callback"><code>subprocess.send()</code></a> for details.</p> | |
<p>It is important to keep in mind that spawned Node.js child processes are | |
independent of the parent with exception of the IPC communication channel | |
that is established between the two. Each process has its own memory, with | |
@@ -12156,7 +12140,7 @@ | |
normally be created on Windows systems. <strong>Default:</strong> <code>true</code>.</li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="child_process.html#child_process_class_childprocess" class="type"><ChildProcess></a></li> | |
+<li>Returns: <a href="#child_process_class_childprocess" class="type"><ChildProcess></a></li> | |
</ul> | |
<p>The <code>child_process.spawn()</code> method spawns a new process using the given | |
<code>command</code>, with command line arguments in <code>args</code>. If omitted, <code>args</code> defaults | |
@@ -12173,7 +12157,7 @@ | |
<p>Use <code>cwd</code> to specify the working directory from which the process is spawned. | |
If not given, the default is to inherit the current working directory.</p> | |
<p>Use <code>env</code> to specify environment variables that will be visible to the new | |
-process, the default is <a href="process.html#process_process_env"><code>process.env</code></a>.</p> | |
+process, the default is <a href="#process_process_env"><code>process.env</code></a>.</p> | |
<p><code>undefined</code> values in <code>env</code> will be ignored.</p> | |
<p>Example of running <code>ls -lh /usr</code>, capturing <code>stdout</code>, <code>stderr</code>, and the | |
exit code:</p> | |
@@ -12302,7 +12286,7 @@ | |
between the parent and child process. By default, the child's stdin, stdout, | |
and stderr are redirected to corresponding <a href="#child_process_subprocess_stdin"><code>subprocess.stdin</code></a>, | |
<a href="#child_process_subprocess_stdout"><code>subprocess.stdout</code></a>, and <a href="#child_process_subprocess_stderr"><code>subprocess.stderr</code></a> streams on the | |
-<a href="child_process.html#child_process_class_childprocess"><code>ChildProcess</code></a> object. This is equivalent to setting the <code>options.stdio</code> | |
+<a href="#child_process_child_process"><code>ChildProcess</code></a> object. This is equivalent to setting the <code>options.stdio</code> | |
equal to <code>['pipe', 'pipe', 'pipe']</code>.</p> | |
<p>For convenience, <code>options.stdio</code> may be one of the following strings:</p> | |
<ul> | |
@@ -12322,12 +12306,12 @@ | |
for fds 0 - 2 are also available as <a href="#child_process_subprocess_stdin"><code>subprocess.stdin</code></a>, | |
<a href="#child_process_subprocess_stdout"><code>subprocess.stdout</code></a> and <a href="#child_process_subprocess_stderr"><code>subprocess.stderr</code></a>, respectively.</li> | |
<li><p><code>'ipc'</code> - Create an IPC channel for passing messages/file descriptors | |
-between parent and child. A <a href="child_process.html#child_process_class_childprocess"><code>ChildProcess</code></a> may have at most <em>one</em> IPC stdio | |
-file descriptor. Setting this option enables the <a href="child_process.html#child_process_subprocess_send_message_sendhandle_options_callback"><code>subprocess.send()</code></a> | |
+between parent and child. A <a href="#child_process_child_process"><code>ChildProcess</code></a> may have at most <em>one</em> IPC stdio | |
+file descriptor. Setting this option enables the <a href="#child_process_subprocess_send_message_sendhandle_options_callback"><code>subprocess.send()</code></a> | |
method. If the child is a Node.js process, the presence of an IPC channel | |
-will enable <a href="process.html#process_process_send_message_sendhandle_options_callback"><code>process.send()</code></a> and <a href="process.html#process_process_disconnect"><code>process.disconnect()</code></a> methods, | |
-as well as <a href="process.html#process_event_disconnect"><code>'disconnect'</code></a> and <a href="child_process.html#child_process_event_message"><code>'message'</code></a> events within the child.</p> | |
-<p>Accessing the IPC channel fd in any way other than <a href="process.html#process_process_send_message_sendhandle_options_callback"><code>process.send()</code></a> | |
+will enable <a href="#process_process_send_message_sendhandle_options_callback"><code>process.send()</code></a> and <a href="#process_process_disconnect"><code>process.disconnect()</code></a> methods, | |
+as well as <a href="#process_event_disconnect"><code>'disconnect'</code></a> and <a href="#process_event_message"><code>'message'</code></a> events within the child.</p> | |
+<p>Accessing the IPC channel fd in any way other than <a href="#process_process_send_message_sendhandle_options_callback"><code>process.send()</code></a> | |
or using the IPC channel with a child process that is not a Node.js instance | |
is not supported.</p> | |
</li> | |
@@ -12335,7 +12319,7 @@ | |
will always open fds 0 - 2 for the processes it spawns, setting the fd to | |
<code>'ignore'</code> will cause Node.js to open <code>/dev/null</code> and attach it to the | |
child's fd.</li> | |
-<li><a href="stream.html#stream_stream" class="type"><Stream></a> object - Share a readable or writable stream that refers to a tty, | |
+<li><a href="#stream_stream" class="type"><Stream></a> object - Share a readable or writable stream that refers to a tty, | |
file, socket, or a pipe with the child process. The stream's underlying | |
file descriptor is duplicated in the child process to the fd that | |
corresponds to the index in the <code>stdio</code> array. Note that the stream must | |
@@ -12343,7 +12327,7 @@ | |
event has occurred).</li> | |
<li>Positive integer - The integer value is interpreted as a file descriptor | |
that is currently open in the parent process. It is shared with the child | |
-process, similar to how <a href="stream.html#stream_stream" class="type"><Stream></a> objects can be shared.</li> | |
+process, similar to how <a href="#stream_stream" class="type"><Stream></a> objects can be shared.</li> | |
<li><code>null</code>, <code>undefined</code> - Use default value. For stdio fds 0, 1, and 2 (in other | |
words, stdin, stdout, and stderr) a pipe is created. For fd 3 and up, the | |
default is <code>'ignore'</code>.</li> | |
@@ -12364,15 +12348,15 @@ | |
<p><em>It is worth noting that when an IPC channel is established between the | |
parent and child processes, and the child is a Node.js process, the child | |
is launched with the IPC channel unreferenced (using <code>unref()</code>) until the | |
-child registers an event handler for the <a href="process.html#process_event_disconnect"><code>'disconnect'</code></a> event | |
-or the <a href="child_process.html#child_process_event_message"><code>'message'</code></a> event. This allows the child to exit | |
+child registers an event handler for the <a href="#process_event_disconnect"><code>'disconnect'</code></a> event | |
+or the <a href="#process_event_message"><code>'message'</code></a> event. This allows the child to exit | |
normally without the process being held open by the open IPC channel.</em></p> | |
<p>On UNIX-like operating systems, the <a href="#child_process_child_process_spawn_command_args_options"><code>child_process.spawn()</code></a> method | |
performs memory operations synchronously before decoupling the event loop | |
from the child. Applications with a large memory footprint may find frequent | |
<a href="#child_process_child_process_spawn_command_args_options"><code>child_process.spawn()</code></a> calls to be a bottleneck. For more information, | |
see <a href="https://bugs.chromium.org/p/v8/issues/detail?id=7381">V8 issue 7381</a>.</p> | |
-<p>See also: <a href="#child_process_child_process_exec_command_options_callback"><code>child_process.exec()</code></a> and <a href="child_process.html#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>.</p> | |
+<p>See also: <a href="#child_process_child_process_exec_command_options_callback"><code>child_process.exec()</code></a> and <a href="#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>.</p> | |
<h2>Synchronous Process Creation<span><a class="mark" href="#child_process_synchronous_process_creation" id="child_process_synchronous_process_creation">#</a></span></h2> | |
<p>The <a href="#child_process_child_process_spawnsync_command_args_options"><code>child_process.spawnSync()</code></a>, <a href="#child_process_child_process_execsync_command_options"><code>child_process.execSync()</code></a>, and | |
<a href="#child_process_child_process_execfilesync_file_args_options"><code>child_process.execFileSync()</code></a> methods are <strong>synchronous</strong> and <strong>WILL</strong> block | |
@@ -12408,7 +12392,7 @@ | |
<li><code>args</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> List of string arguments.</li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>cwd</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Current working directory of the child process.</li> | |
-<li><code>input</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> The value which will be passed as stdin | |
+<li><code>input</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> The value which will be passed as stdin | |
to the spawned process. Supplying this value will override <code>stdio[0]</code>.</li> | |
<li><code>stdio</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="type"><Array></a> Child's stdio configuration. <code>stderr</code> by default will | |
be output to the parent process' stderr unless <code>stdio</code> is specified. | |
@@ -12433,7 +12417,7 @@ | |
<a href="#child_process_default_windows_shell">Default Windows Shell</a>. <strong>Default:</strong> <code>false</code> (no shell).</li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The stdout from the command.</li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The stdout from the command.</li> | |
</ul> | |
<p>The <code>child_process.execFileSync()</code> method is generally identical to | |
<a href="#child_process_child_process_execfile_file_args_options_callback"><code>child_process.execFile()</code></a> with the exception that the method will not return | |
@@ -12444,7 +12428,7 @@ | |
does not exit, the parent process will still wait until the child process has | |
exited.</p> | |
<p>If the process times out or has a non-zero exit code, this method <strong><em>will</em></strong> | |
-throw an <a href="errors.html#errors_class_error"><code>Error</code></a> that will include the full result of the underlying | |
+throw an <a href="#errors_class_error"><code>Error</code></a> that will include the full result of the underlying | |
<a href="#child_process_child_process_spawnsync_command_args_options"><code>child_process.spawnSync()</code></a>.</p> | |
<p><strong>If the <code>shell</code> option is enabled, do not pass unsanitized user input to this | |
function. Any input containing shell metacharacters may be used to trigger | |
@@ -12472,7 +12456,7 @@ | |
<li><code>command</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The command to run.</li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>cwd</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Current working directory of the child process.</li> | |
-<li><code>input</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> The value which will be passed as stdin | |
+<li><code>input</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> The value which will be passed as stdin | |
to the spawned process. Supplying this value will override <code>stdio[0]</code>.</li> | |
<li><code>stdio</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="type"><Array></a> Child's stdio configuration. <code>stderr</code> by default will | |
be output to the parent process' stderr unless <code>stdio</code> is specified. | |
@@ -12496,7 +12480,7 @@ | |
normally be created on Windows systems. <strong>Default:</strong> <code>true</code>.</li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The stdout from the command.</li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The stdout from the command.</li> | |
</ul> | |
<p>The <code>child_process.execSync()</code> method is generally identical to | |
<a href="#child_process_child_process_exec_command_options_callback"><code>child_process.exec()</code></a> with the exception that the method will not return until | |
@@ -12506,7 +12490,7 @@ | |
signal and doesn't exit, the parent process will wait until the child | |
process has exited.</em></p> | |
<p>If the process times out or has a non-zero exit code, this method <strong><em>will</em></strong> | |
-throw. The <a href="errors.html#errors_class_error"><code>Error</code></a> object will contain the entire result from | |
+throw. The <a href="#errors_class_error"><code>Error</code></a> object will contain the entire result from | |
<a href="#child_process_child_process_spawnsync_command_args_options"><code>child_process.spawnSync()</code></a>.</p> | |
<p><strong>Never pass unsanitized user input to this function. Any input containing shell | |
metacharacters may be used to trigger arbitrary command execution.</strong></p> | |
@@ -12540,7 +12524,7 @@ | |
<li><code>args</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> List of string arguments.</li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>cwd</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Current working directory of the child process.</li> | |
-<li><code>input</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> The value which will be passed as stdin | |
+<li><code>input</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> The value which will be passed as stdin | |
to the spawned process. Supplying this value will override <code>stdio[0]</code>.</li> | |
<li><code>stdio</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="type"><Array></a> Child's stdio configuration.</li> | |
<li><code>env</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> Environment key-value pairs.</li> | |
@@ -12569,8 +12553,8 @@ | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>pid</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Pid of the child process.</li> | |
<li><code>output</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="type"><Array></a> Array of results from stdio output.</li> | |
-<li><code>stdout</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The contents of <code>output[1]</code>.</li> | |
-<li><code>stderr</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The contents of <code>output[2]</code>.</li> | |
+<li><code>stdout</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The contents of <code>output[1]</code>.</li> | |
+<li><code>stderr</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The contents of <code>output[2]</code>.</li> | |
<li><code>status</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> The exit code of the child process.</li> | |
<li><code>signal</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The signal used to kill the child process.</li> | |
<li><code>error</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a> The error object if the child process failed or timed out.</li> | |
@@ -12590,11 +12574,11 @@ | |
<h2>Class: ChildProcess<span><a class="mark" href="#child_process_class_childprocess" id="child_process_class_childprocess">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v2.2.0</span> | |
-</div><p>Instances of the <code>ChildProcess</code> class are <a href="events.html"><code>EventEmitters</code></a> that represent | |
+</div><p>Instances of the <code>ChildProcess</code> class are <a href="#events_class_eventemitter"><code>EventEmitters</code></a> that represent | |
spawned child processes.</p> | |
<p>Instances of <code>ChildProcess</code> are not intended to be created directly. Rather, | |
use the <a href="#child_process_child_process_spawn_command_args_options"><code>child_process.spawn()</code></a>, <a href="#child_process_child_process_exec_command_options_callback"><code>child_process.exec()</code></a>, | |
-<a href="#child_process_child_process_execfile_file_args_options_callback"><code>child_process.execFile()</code></a>, or <a href="child_process.html#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a> methods to create | |
+<a href="#child_process_child_process_execfile_file_args_options_callback"><code>child_process.execFile()</code></a>, or <a href="#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a> methods to create | |
instances of <code>ChildProcess</code>.</p> | |
<h3>Event: 'close'<span><a class="mark" href="#child_process_event_close" id="child_process_event_close">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -12604,14 +12588,14 @@ | |
<li><code>signal</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The signal by which the child process was terminated.</li> | |
</ul> | |
<p>The <code>'close'</code> event is emitted when the stdio streams of a child process have | |
-been closed. This is distinct from the <a href="#process_event_exit"><code>'exit'</code></a> event, since multiple | |
+been closed. This is distinct from the <a href="#child_process_event_exit"><code>'exit'</code></a> event, since multiple | |
processes might share the same stdio streams.</p> | |
<h3>Event: 'disconnect'<span><a class="mark" href="#child_process_event_disconnect" id="child_process_event_disconnect">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.7.2</span> | |
</div><p>The <code>'disconnect'</code> event is emitted after calling the | |
<a href="#child_process_subprocess_disconnect"><code>subprocess.disconnect()</code></a> method in parent process or | |
-<a href="process.html#process_process_disconnect"><code>process.disconnect()</code></a> in child process. After disconnecting it is no longer | |
+<a href="#process_process_disconnect"><code>process.disconnect()</code></a> in child process. After disconnecting it is no longer | |
possible to send or receive messages, and the <a href="#child_process_subprocess_connected"><code>subprocess.connected</code></a> | |
property is <code>false</code>.</p> | |
<h3>Event: 'error'<span><a class="mark" href="#child_process_event_error" id="child_process_event_error">#</a></span></h3> | |
@@ -12627,7 +12611,7 @@ | |
<p>The <code>'exit'</code> event may or may not fire after an error has occurred. When | |
listening to both the <code>'exit'</code> and <code>'error'</code> events, it is important to guard | |
against accidentally invoking handler functions multiple times.</p> | |
-<p>See also <a href="child_process.html#child_process_subprocess_kill_signal"><code>subprocess.kill()</code></a> and <a href="child_process.html#child_process_subprocess_send_message_sendhandle_options_callback"><code>subprocess.send()</code></a>.</p> | |
+<p>See also <a href="#child_process_subprocess_kill_signal"><code>subprocess.kill()</code></a> and <a href="#child_process_subprocess_send_message_sendhandle_options_callback"><code>subprocess.send()</code></a>.</p> | |
<h3>Event: 'exit'<span><a class="mark" href="#child_process_event_exit" id="child_process_event_exit">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.90</span> | |
@@ -12651,10 +12635,10 @@ | |
<span>Added in: v0.5.9</span> | |
</div><ul> | |
<li><code>message</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> A parsed JSON object or primitive value.</li> | |
-<li><code>sendHandle</code> <a href="net.html#net_server_listen_handle_backlog_callback" class="type"><Handle></a> A <a href="net.html#net_class_net_socket"><code>net.Socket</code></a> or <a href="net.html#net_class_net_server"><code>net.Server</code></a> object, or | |
+<li><code>sendHandle</code> <a href="#net_server_listen_handle_backlog_callback" class="type"><Handle></a> A <a href="#net_class_net_socket"><code>net.Socket</code></a> or <a href="#net_class_net_server"><code>net.Server</code></a> object, or | |
undefined.</li> | |
</ul> | |
-<p>The <code>'message'</code> event is triggered when a child process uses <a href="process.html#process_process_send_message_sendhandle_options_callback"><code>process.send()</code></a> | |
+<p>The <code>'message'</code> event is triggered when a child process uses <a href="#process_process_send_message_sendhandle_options_callback"><code>process.send()</code></a> | |
to send messages.</p> | |
<p>The message goes through serialization and parsing. The resulting | |
message might not be the same as what is originally sent.</p> | |
@@ -12687,7 +12671,7 @@ | |
process of being received. This will most often be triggered immediately after | |
calling <code>subprocess.disconnect()</code>.</p> | |
<p>Note that when the child process is a Node.js instance (e.g. spawned using | |
-<a href="child_process.html#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>), the <code>process.disconnect()</code> method can be invoked | |
+<a href="#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>), the <code>process.disconnect()</code> method can be invoked | |
within the child process to close the IPC channel as well.</p> | |
<h3>subprocess.kill([signal])<span><a class="mark" href="#child_process_subprocess_kill_signal" id="child_process_subprocess_kill_signal">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -12709,7 +12693,7 @@ | |
// Send SIGHUP to process | |
grep.kill('SIGHUP'); | |
</code></pre> | |
-<p>The <a href="child_process.html#child_process_class_childprocess"><code>ChildProcess</code></a> object may emit an <a href="#net_event_error_1"><code>'error'</code></a> event if the signal cannot be | |
+<p>The <a href="#child_process_child_process"><code>ChildProcess</code></a> object may emit an <a href="#child_process_event_error"><code>'error'</code></a> event if the signal cannot be | |
delivered. Sending a signal to a child process that has already exited is not | |
an error but may have unforeseen consequences. Specifically, if the process | |
identifier (PID) has been reassigned to another process, the signal will be | |
@@ -12785,7 +12769,7 @@ | |
</details> | |
</div><ul> | |
<li><code>message</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> | |
-<li><code>sendHandle</code> <a href="net.html#net_server_listen_handle_backlog_callback" class="type"><Handle></a></li> | |
+<li><code>sendHandle</code> <a href="#net_server_listen_handle_backlog_callback" class="type"><Handle></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> The <code>options</code> argument, if present, is an object used to | |
parameterize the sending of certain types of handles. <code>options</code> supports | |
the following properties:<ul> | |
@@ -12798,9 +12782,9 @@ | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
</ul> | |
<p>When an IPC channel has been established between the parent and child ( | |
-i.e. when using <a href="child_process.html#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>), the <code>subprocess.send()</code> method can | |
+i.e. when using <a href="#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>), the <code>subprocess.send()</code> method can | |
be used to send messages to the child process. When the child process is a | |
-Node.js instance, these messages can be received via the <a href="child_process.html#child_process_event_message"><code>'message'</code></a> event.</p> | |
+Node.js instance, these messages can be received via the <a href="#process_event_message"><code>'message'</code></a> event.</p> | |
<p>The message goes through serialization and parsing. The resulting | |
message might not be the same as what is originally sent.</p> | |
<p>For example, in the parent script:</p> | |
@@ -12822,11 +12806,11 @@ | |
// Causes the parent to print: PARENT got message: { foo: 'bar', baz: null } | |
process.send({ foo: 'bar', baz: NaN }); | |
</code></pre> | |
-<p>Child Node.js processes will have a <a href="process.html#process_process_send_message_sendhandle_options_callback"><code>process.send()</code></a> method of their own that | |
+<p>Child Node.js processes will have a <a href="#process_process_send_message_sendhandle_options_callback"><code>process.send()</code></a> method of their own that | |
allows the child to send messages back to the parent.</p> | |
<p>There is a special case when sending a <code>{cmd: 'NODE_foo'}</code> message. Messages | |
containing a <code>NODE_</code> prefix in the <code>cmd</code> property are reserved for use within | |
-Node.js core and will not be emitted in the child's <a href="child_process.html#child_process_event_message"><code>'message'</code></a> | |
+Node.js core and will not be emitted in the child's <a href="#process_event_message"><code>'message'</code></a> | |
event. Rather, such messages are emitted using the | |
<code>'internalMessage'</code> event and are consumed internally by Node.js. | |
Applications should avoid using such messages or listening for | |
@@ -12834,13 +12818,13 @@ | |
<p>The optional <code>sendHandle</code> argument that may be passed to <code>subprocess.send()</code> is | |
for passing a TCP server or socket object to the child process. The child will | |
receive the object as the second argument passed to the callback function | |
-registered on the <a href="child_process.html#child_process_event_message"><code>'message'</code></a> event. Any data that is received | |
+registered on the <a href="#process_event_message"><code>'message'</code></a> event. Any data that is received | |
and buffered in the socket will not be sent to the child.</p> | |
<p>The optional <code>callback</code> is a function that is invoked after the message is | |
sent but before the child may have received it. The function is called with a | |
-single argument: <code>null</code> on success, or an <a href="errors.html#errors_class_error"><code>Error</code></a> object on failure.</p> | |
+single argument: <code>null</code> on success, or an <a href="#errors_class_error"><code>Error</code></a> object on failure.</p> | |
<p>If no <code>callback</code> function is provided and the message cannot be sent, an | |
-<code>'error'</code> event will be emitted by the <a href="child_process.html#child_process_class_childprocess"><code>ChildProcess</code></a> object. This can happen, | |
+<code>'error'</code> event will be emitted by the <a href="#child_process_child_process"><code>ChildProcess</code></a> object. This can happen, | |
for instance, when the child process has already exited.</p> | |
<p><code>subprocess.send()</code> will return <code>false</code> if the channel has closed or when the | |
backlog of unsent messages exceeds a threshold that makes it unwise to send | |
@@ -12922,7 +12906,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.90</span> | |
</div><ul> | |
-<li><a href="stream.html#stream_class_stream_readable" class="type"><stream.Readable></a></li> | |
+<li><a href="#stream_class_stream_readable" class="type"><stream.Readable></a></li> | |
</ul> | |
<p>A <code>Readable Stream</code> that represents the child process's <code>stderr</code>.</p> | |
<p>If the child was spawned with <code>stdio[2]</code> set to anything other than <code>'pipe'</code>, | |
@@ -12933,7 +12917,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.90</span> | |
</div><ul> | |
-<li><a href="stream.html#stream_class_stream_writable" class="type"><stream.Writable></a></li> | |
+<li><a href="#stream_class_stream_writable" class="type"><stream.Writable></a></li> | |
</ul> | |
<p>A <code>Writable Stream</code> that represents the child process's <code>stdin</code>.</p> | |
<p><em>Note that if a child process waits to read all of its input, the child will not | |
@@ -12981,7 +12965,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.90</span> | |
</div><ul> | |
-<li><a href="stream.html#stream_class_stream_readable" class="type"><stream.Readable></a></li> | |
+<li><a href="#stream_class_stream_readable" class="type"><stream.Readable></a></li> | |
</ul> | |
<p>A <code>Readable Stream</code> that represents the child process's <code>stdout</code>.</p> | |
<p>If the child was spawned with <code>stdio[1]</code> set to anything other than <code>'pipe'</code>, | |
@@ -13003,11 +12987,9 @@ | |
the same requirement. Thus, in <code>child_process</code> functions where a shell can be | |
spawned, <code>'cmd.exe'</code> is used as a fallback if <code>process.env.ComSpec</code> is | |
unavailable.</p> | |
-<!-- [end-include:child_process.md] --> | |
-<!-- [start-include:cluster.md] --> | |
<h1>Cluster<span><a class="mark" href="#cluster_cluster" id="cluster_cluster">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>A single instance of Node.js runs in a single thread. To take advantage of | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>A single instance of Node.js runs in a single thread. To take advantage of | |
multi-core systems, the user will sometimes want to launch a cluster of Node.js | |
processes to handle the load.</p> | |
<p>The cluster module allows easy creation of child processes that all share | |
@@ -13050,7 +13032,7 @@ | |
server in a worker.</p> | |
<h2>How It Works<span><a class="mark" href="#cluster_how_it_works" id="cluster_how_it_works">#</a></span></h2> | |
<!--type=misc--> | |
-<p>The worker processes are spawned using the <a href="child_process.html#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a> method, | |
+<p>The worker processes are spawned using the <a href="#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a> method, | |
so that they can communicate with the parent via IPC and pass server | |
handles back and forth.</p> | |
<p>The cluster module supports two methods of distributing incoming | |
@@ -13114,7 +13096,7 @@ | |
<h3>Event: 'error'<span><a class="mark" href="#cluster_event_error" id="cluster_event_error">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.7.3</span> | |
-</div><p>This event is the same as the one provided by <a href="child_process.html#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>.</p> | |
+</div><p>This event is the same as the one provided by <a href="#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>.</p> | |
<p>Within a worker, <code>process.on('error')</code> may also be used.</p> | |
<h3>Event: 'exit'<span><a class="mark" href="#cluster_event_exit" id="cluster_event_exit">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -13157,7 +13139,7 @@ | |
</ul> | |
<p>Similar to the <code>'message'</code> event of <code>cluster</code>, but specific to this worker.</p> | |
<p>Within a worker, <code>process.on('message')</code> may also be used.</p> | |
-<p>See <a href="process.html#process_event_message"><code>process</code> event: <code>'message'</code></a>.</p> | |
+<p>See <a href="#process_event_message"><code>process</code> event: <code>'message'</code></a>.</p> | |
<p>As an example, here is a cluster that keeps count of the number of requests | |
in the master process using the message system:</p> | |
<pre><code class="lang-js">const cluster = require('cluster'); | |
@@ -13223,7 +13205,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li>Returns: <a href="cluster.html#cluster_class_worker" class="type"><cluster.Worker></a> A reference to <code>worker</code>.</li> | |
+<li>Returns: <a href="#cluster_class_worker" class="type"><cluster.Worker></a> A reference to <code>worker</code>.</li> | |
</ul> | |
<p>In a worker, this function will close all servers, wait for the <code>'close'</code> event | |
on those servers, and then disconnect the IPC channel.</p> | |
@@ -13233,13 +13215,13 @@ | |
<p>Note that after a server is closed, it will no longer accept new connections, | |
but connections may be accepted by any other listening worker. Existing | |
connections will be allowed to close as usual. When no more connections exist, | |
-see <a href="#net_server_close_callback"><code>server.close()</code></a>, the IPC channel to the worker will close allowing it | |
+see <a href="#net_event_close"><code>server.close()</code></a>, the IPC channel to the worker will close allowing it | |
to die gracefully.</p> | |
<p>The above applies <em>only</em> to server connections, client connections are not | |
automatically closed by workers, and disconnect does not wait for them to close | |
before exiting.</p> | |
<p>Note that in a worker, <code>process.disconnect</code> exists, but it is not this function, | |
-it is <a href="child_process.html#child_process_subprocess_disconnect"><code>disconnect</code></a>.</p> | |
+it is <a href="#child_process_subprocess_disconnect"><code>disconnect</code></a>.</p> | |
<p>Because long living server connections may block workers from disconnecting, it | |
may be useful to send a message, so application specific actions may be taken to | |
close them. It also may be useful to implement a timeout, killing a worker if | |
@@ -13282,7 +13264,7 @@ | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
</ul> | |
<p>Set by calling <code>.kill()</code> or <code>.disconnect()</code>. Until then, it is <code>undefined</code>.</p> | |
-<p>The boolean <a href="cluster.html#cluster_worker_exitedafterdisconnect"><code>worker.exitedAfterDisconnect</code></a> allows distinguishing between | |
+<p>The boolean <a href="#cluster_worker_exitedafterdisconnect"><code>worker.exitedAfterDisconnect</code></a> allows distinguishing between | |
voluntary and accidental exit, the master may choose not to respawn a worker | |
based on this value.</p> | |
<pre><code class="lang-js">cluster.on('exit', (worker, code, signal) => { | |
@@ -13328,17 +13310,17 @@ | |
<p>Causes <code>.exitedAfterDisconnect</code> to be set.</p> | |
<p>This method is aliased as <code>worker.destroy()</code> for backwards compatibility.</p> | |
<p>Note that in a worker, <code>process.kill()</code> exists, but it is not this function, | |
-it is <a href="process.html#process_process_kill_pid_signal"><code>kill</code></a>.</p> | |
+it is <a href="#process_process_kill_pid_signal"><code>kill</code></a>.</p> | |
<h3>worker.process<span><a class="mark" href="#cluster_worker_process" id="cluster_worker_process">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.7.0</span> | |
</div><ul> | |
-<li><a href="child_process.html#child_process_class_childprocess" class="type"><ChildProcess></a></li> | |
+<li><a href="#child_process_class_childprocess" class="type"><ChildProcess></a></li> | |
</ul> | |
-<p>All workers are created using <a href="child_process.html#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>, the returned object | |
+<p>All workers are created using <a href="#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>, the returned object | |
from this function is stored as <code>.process</code>. In a worker, the global <code>process</code> | |
is stored.</p> | |
-<p>See: <a href="child_process.html#child_process_child_process_fork_modulepath_args_options">Child Process module</a>.</p> | |
+<p>See: <a href="#child_process_child_process_fork_modulepath_args_options">Child Process module</a>.</p> | |
<p>Note that workers will call <code>process.exit(0)</code> if the <code>'disconnect'</code> event occurs | |
on <code>process</code> and <code>.exitedAfterDisconnect</code> is not <code>true</code>. This protects against | |
accidental disconnection.</p> | |
@@ -13357,13 +13339,13 @@ | |
</details> | |
</div><ul> | |
<li><code>message</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> | |
-<li><code>sendHandle</code> <a href="net.html#net_server_listen_handle_backlog_callback" class="type"><Handle></a></li> | |
+<li><code>sendHandle</code> <a href="#net_server_listen_handle_backlog_callback" class="type"><Handle></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
</ul> | |
<p>Send a message to a worker or master, optionally with a handle.</p> | |
<p>In the master this sends a message to a specific worker. It is identical to | |
-<a href="child_process.html#child_process_subprocess_send_message_sendhandle_options_callback"><code>ChildProcess.send()</code></a>.</p> | |
+<a href="#child_process_subprocess_send_message_sendhandle_options_callback"><code>ChildProcess.send()</code></a>.</p> | |
<p>In a worker this sends a message to the master. It is identical to | |
<code>process.send()</code>.</p> | |
<p>This example will echo back all messages from the master:</p> | |
@@ -13381,7 +13363,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.7.9</span> | |
</div><ul> | |
-<li><code>worker</code> <a href="cluster.html#cluster_class_worker" class="type"><cluster.Worker></a></li> | |
+<li><code>worker</code> <a href="#cluster_class_worker" class="type"><cluster.Worker></a></li> | |
</ul> | |
<p>Emitted after the worker IPC channel has disconnected. This can occur when a | |
worker exits gracefully, is killed, or is disconnected manually (such as with | |
@@ -13397,7 +13379,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.7.9</span> | |
</div><ul> | |
-<li><code>worker</code> <a href="cluster.html#cluster_class_worker" class="type"><cluster.Worker></a></li> | |
+<li><code>worker</code> <a href="#cluster_class_worker" class="type"><cluster.Worker></a></li> | |
<li><code>code</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> The exit code, if it exited normally.</li> | |
<li><code>signal</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The name of the signal (e.g. <code>'SIGHUP'</code>) that caused | |
the process to be killed.</li> | |
@@ -13410,12 +13392,12 @@ | |
cluster.fork(); | |
}); | |
</code></pre> | |
-<p>See <a href="child_process.html#child_process_event_exit"><code>child_process</code> event: <code>'exit'</code></a>.</p> | |
+<p>See <a href="#child_process_event_exit"><code>child_process</code> event: <code>'exit'</code></a>.</p> | |
<h2>Event: 'fork'<span><a class="mark" href="#cluster_event_fork" id="cluster_event_fork">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.7.0</span> | |
</div><ul> | |
-<li><code>worker</code> <a href="cluster.html#cluster_class_worker" class="type"><cluster.Worker></a></li> | |
+<li><code>worker</code> <a href="#cluster_class_worker" class="type"><cluster.Worker></a></li> | |
</ul> | |
<p>When a new worker is forked the cluster module will emit a <code>'fork'</code> event. | |
This can be used to log worker activity, and create a custom timeout.</p> | |
@@ -13439,7 +13421,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.7.0</span> | |
</div><ul> | |
-<li><code>worker</code> <a href="cluster.html#cluster_class_worker" class="type"><cluster.Worker></a></li> | |
+<li><code>worker</code> <a href="#cluster_class_worker" class="type"><cluster.Worker></a></li> | |
<li><code>address</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> | |
</ul> | |
<p>After calling <code>listen()</code> from a worker, when the <code>'listening'</code> event is emitted | |
@@ -13475,12 +13457,12 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>worker</code> <a href="cluster.html#cluster_class_worker" class="type"><cluster.Worker></a></li> | |
+<li><code>worker</code> <a href="#cluster_class_worker" class="type"><cluster.Worker></a></li> | |
<li><code>message</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> | |
<li><code>handle</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type" class="type"><undefined></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> | |
</ul> | |
<p>Emitted when the cluster master receives a message from any worker.</p> | |
-<p>See <a href="child_process.html#child_process_event_message"><code>child_process</code> event: <code>'message'</code></a>.</p> | |
+<p>See <a href="#child_process_event_message"><code>child_process</code> event: <code>'message'</code></a>.</p> | |
<p>Before Node.js v6.0, this event emitted only the message and the handle, | |
but not the worker object, contrary to what the documentation stated.</p> | |
<p>If support for older versions is required but a worker object is not | |
@@ -13499,7 +13481,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.7.0</span> | |
</div><ul> | |
-<li><code>worker</code> <a href="cluster.html#cluster_class_worker" class="type"><cluster.Worker></a></li> | |
+<li><code>worker</code> <a href="#cluster_class_worker" class="type"><cluster.Worker></a></li> | |
</ul> | |
<p>After forking a new worker, the worker should respond with an online message. | |
When the master receives an online message it will emit this event. | |
@@ -13538,7 +13520,7 @@ | |
<span>Added in: v0.6.0</span> | |
</div><ul> | |
<li><code>env</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> Key/value pairs to add to worker process environment.</li> | |
-<li>Returns: <a href="cluster.html#cluster_class_worker" class="type"><cluster.Worker></a></li> | |
+<li>Returns: <a href="#cluster_class_worker" class="type"><cluster.Worker></a></li> | |
</ul> | |
<p>Spawn a new worker process.</p> | |
<p>This can only be called from the master process.</p> | |
@@ -13711,8 +13693,6 @@ | |
const worker = cluster.workers[id]; | |
}); | |
</code></pre> | |
-<!-- [end-include:cluster.md] --> | |
-<!-- [start-include:cli.md] --> | |
<h1>Command Line Options<span><a class="mark" href="#cli_command_line_options" id="cli_command_line_options">#</a></span></h1> | |
<!--introduced_in=v5.9.1--> | |
<!--type=misc--> | |
@@ -13723,7 +13703,7 @@ | |
<p><code>node [options] [V8 options] [script.js | -e "script" | -] [--] [arguments]</code></p> | |
<p><code>node debug [script.js | -e "script" | <host>:<port>] …</code></p> | |
<p><code>node --v8-options</code></p> | |
-<p>Execute without arguments to start the <a href="repl.html#repl_repl">REPL</a>.</p> | |
+<p>Execute without arguments to start the <a href="repl.html">REPL</a>.</p> | |
<p><em>For more info about <code>node debug</code>, please see the <a href="debugger.html">debugger</a> documentation.</em></p> | |
<h2>Options<span><a class="mark" href="#cli_options" id="cli_options">#</a></span></h2> | |
<h3><code>-</code><span><a class="mark" href="#cli" id="cli">#</a></span></h3> | |
@@ -13744,7 +13724,7 @@ | |
</div><p>Aborting instead of exiting causes a core file to be generated for post-mortem | |
analysis using a debugger (such as <code>lldb</code>, <code>gdb</code>, and <code>mdb</code>).</p> | |
<p>If this flag is passed, the behavior can still be set to not abort through | |
-<a href="process.html#process_process_setuncaughtexceptioncapturecallback_fn"><code>process.setUncaughtExceptionCaptureCallback()</code></a> (and through usage of the | |
+<a href="#process_process_setuncaughtexceptioncapturecallback_fn"><code>process.setUncaughtExceptionCaptureCallback()</code></a> (and through usage of the | |
<code>domain</code> module that uses it).</p> | |
<h3><code>--enable-fips</code><span><a class="mark" href="#cli_enable_fips" id="cli_enable_fips">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -13962,7 +13942,7 @@ | |
<h3><code>--zero-fill-buffers</code><span><a class="mark" href="#cli_zero_fill_buffers" id="cli_zero_fill_buffers">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v6.0.0</span> | |
-</div><p>Automatically zero-fills all newly allocated <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> and <a href="buffer.html#buffer_class_slowbuffer"><code>SlowBuffer</code></a> | |
+</div><p>Automatically zero-fills all newly allocated <a href="#buffer_class_buffer"><code>Buffer</code></a> and <a href="#buffer_class_slowbuffer"><code>SlowBuffer</code></a> | |
instances.</p> | |
<h3><code>-c</code>, <code>--check</code><span><a class="mark" href="#cli_c_check" id="cli_c_check">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -14044,7 +14024,7 @@ | |
</div><p>When set, the well known "root" CAs (like VeriSign) will be extended with the | |
extra certificates in <code>file</code>. The file should consist of one or more trusted | |
certificates in PEM format. A message will be emitted (once) with | |
-<a href="process.html#process_process_emitwarning_warning_type_code_ctor"><code>process.emitWarning()</code></a> if the file is missing or | |
+<a href="#process_process_emitwarning_warning_type_code_ctor"><code>process.emitWarning()</code></a> if the file is missing or | |
malformed, but any errors are otherwise ignored.</p> | |
<p>Note that neither the well known nor extra certificates are used when the <code>ca</code> | |
options property is explicitly specified for a TLS or HTTPS client or server.</p> | |
@@ -14186,23 +14166,21 @@ | |
threadpool by setting the <code>'UV_THREADPOOL_SIZE'</code> environment variable to a value | |
greater than <code>4</code> (its current default value). For more information, see the | |
<a href="http://docs.libuv.org/en/latest/threadpool.html">libuv threadpool documentation</a>.</p> | |
-<!-- [end-include:cli.md] --> | |
-<!-- [start-include:console.md] --> | |
<h1>Console<span><a class="mark" href="#console_console" id="console_console">#</a></span></h1> | |
<!--introduced_in=v0.10.13--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>console</code> module provides a simple debugging console that is similar to the | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>console</code> module provides a simple debugging console that is similar to the | |
JavaScript console mechanism provided by web browsers.</p> | |
<p>The module exports two specific components:</p> | |
<ul> | |
<li>A <code>Console</code> class with methods such as <code>console.log()</code>, <code>console.error()</code> and | |
<code>console.warn()</code> that can be used to write to any Node.js stream.</li> | |
-<li>A global <code>console</code> instance configured to write to <a href="process.html#process_process_stdout"><code>process.stdout</code></a> and | |
-<a href="process.html#process_process_stderr"><code>process.stderr</code></a>. The global <code>console</code> can be used without calling | |
+<li>A global <code>console</code> instance configured to write to <a href="#process_process_stdout"><code>process.stdout</code></a> and | |
+<a href="#process_process_stderr"><code>process.stderr</code></a>. The global <code>console</code> can be used without calling | |
<code>require('console')</code>.</li> | |
</ul> | |
<p><strong><em>Warning</em></strong>: The global console object's methods are neither consistently | |
synchronous like the browser APIs they resemble, nor are they consistently | |
-asynchronous like all other Node.js streams. See the <a href="process.html#process_a_note_on_process_i_o">note on process I/O</a> for | |
+asynchronous like all other Node.js streams. See the <a href="#process_a_note_on_process_i_o">note on process I/O</a> for | |
more information.</p> | |
<p>Example using the global <code>console</code>:</p> | |
<pre><code class="lang-js">console.log('hello world'); | |
@@ -14266,8 +14244,8 @@ | |
</details> | |
</div><ul> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
-<li><code>stdout</code> <a href="stream.html#stream_class_stream_writable" class="type"><stream.Writable></a></li> | |
-<li><code>stderr</code> <a href="stream.html#stream_class_stream_writable" class="type"><stream.Writable></a></li> | |
+<li><code>stdout</code> <a href="#stream_class_stream_writable" class="type"><stream.Writable></a></li> | |
+<li><code>stderr</code> <a href="#stream_class_stream_writable" class="type"><stream.Writable></a></li> | |
<li><code>ignoreErrors</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> Ignore errors when writing to the underlying | |
streams. <strong>Default:</strong> <code>true</code>.</li> | |
<li><code>colorMode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Set color support for this <code>Console</code> instance. | |
@@ -14291,7 +14269,7 @@ | |
// in stdout.log: count 5 | |
</code></pre> | |
<p>The global <code>console</code> is a special <code>Console</code> whose output is sent to | |
-<a href="process.html#process_process_stdout"><code>process.stdout</code></a> and <a href="process.html#process_process_stderr"><code>process.stderr</code></a>. It is equivalent to calling:</p> | |
+<a href="#process_process_stdout"><code>process.stdout</code></a> and <a href="#process_process_stderr"><code>process.stderr</code></a>. It is equivalent to calling:</p> | |
<pre><code class="lang-js">new Console({ stdout: process.stdout, stderr: process.stderr }); | |
</code></pre> | |
<h3>console.assert(value[, ...message])<span><a class="mark" href="#console_console_assert_value_message" id="console_console_assert_value_message">#</a></span></h3> | |
@@ -14396,7 +14374,7 @@ | |
<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a></li> | |
<li><code>...args</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a></li> | |
</ul> | |
-<p>The <code>console.debug()</code> function is an alias for <a href="console.html#console_console_log_data_args"><code>console.log()</code></a>.</p> | |
+<p>The <code>console.debug()</code> function is an alias for <a href="#console_console_log_data_args"><code>console.log()</code></a>.</p> | |
<h3>console.dir(obj[, options])<span><a class="mark" href="#console_console_dir_obj_options" id="console_console_dir_obj_options">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.101</span> | |
@@ -14410,7 +14388,7 @@ | |
objects. To make it recurse indefinitely, pass <code>null</code>. <strong>Default:</strong> <code>2</code>.</li> | |
<li><code>colors</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> If <code>true</code>, then the output will be styled with ANSI color | |
codes. Colors are customizable; | |
- see <a href="util.html#util_customizing_util_inspect_colors">customizing <code>util.inspect()</code> colors</a>. <strong>Default:</strong> <code>false</code>.</li> | |
+ see <a href="#util_customizing_util_inspect_colors">customizing <code>util.inspect()</code> colors</a>. <strong>Default:</strong> <code>false</code>.</li> | |
</ul> | |
</li> | |
</ul> | |
@@ -14478,7 +14456,7 @@ | |
<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a></li> | |
<li><code>...args</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a></li> | |
</ul> | |
-<p>The <code>console.info()</code> function is an alias for <a href="console.html#console_console_log_data_args"><code>console.log()</code></a>.</p> | |
+<p>The <code>console.info()</code> function is an alias for <a href="#console_console_log_data_args"><code>console.log()</code></a>.</p> | |
<h3>console.log([data][, ...args])<span><a class="mark" href="#console_console_log_data_args" id="console_console_log_data_args">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.100</span> | |
@@ -14593,7 +14571,7 @@ | |
<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a></li> | |
<li><code>...args</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a></li> | |
</ul> | |
-<p>The <code>console.warn()</code> function is an alias for <a href="console.html#console_console_error_data_args"><code>console.error()</code></a>.</p> | |
+<p>The <code>console.warn()</code> function is an alias for <a href="#console_console_error_data_args"><code>console.error()</code></a>.</p> | |
<h2>Inspector only methods<span><a class="mark" href="#console_inspector_only_methods" id="console_inspector_only_methods">#</a></span></h2> | |
<p>The following methods are exposed by the V8 engine in the general API but do | |
not display anything unless used in conjunction with the <a href="debugger.html">inspector</a> | |
@@ -14657,11 +14635,9 @@ | |
<p>This method does not display anything unless used in the inspector. The | |
<code>console.timelineEnd()</code> method is the deprecated form of | |
<a href="#console_console_timeend_label"><code>console.timeEnd()</code></a>.</p> | |
-<!-- [end-include:console.md] --> | |
-<!-- [start-include:crypto.md] --> | |
<h1>Crypto<span><a class="mark" href="#crypto_crypto" id="crypto_crypto">#</a></span></h1> | |
<!--introduced_in=v0.3.6--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>crypto</code> module provides cryptographic functionality that includes a set of | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>crypto</code> module provides cryptographic functionality that includes a set of | |
wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify functions.</p> | |
<p>Use <code>require('crypto')</code> to access this module.</p> | |
<pre><code class="lang-js">const crypto = require('crypto'); | |
@@ -14699,8 +14675,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v9.0.0</span> | |
</div><ul> | |
-<li><code>spkac</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> The challenge component of the <code>spkac</code> data structure, which | |
+<li><code>spkac</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> The challenge component of the <code>spkac</code> data structure, which | |
includes a public key and a challenge.</li> | |
</ul> | |
<pre><code class="lang-js">const { Certificate } = require('crypto'); | |
@@ -14713,9 +14689,9 @@ | |
<div class="api_metadata"> | |
<span>Added in: v9.0.0</span> | |
</div><ul> | |
-<li><code>spkac</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>spkac</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> The public key component of the <code>spkac</code> data structure, | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> The public key component of the <code>spkac</code> data structure, | |
which includes a public key and a challenge.</li> | |
</ul> | |
<pre><code class="lang-js">const { Certificate } = require('crypto'); | |
@@ -14728,7 +14704,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v9.0.0</span> | |
</div><ul> | |
-<li><code>spkac</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>spkac</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> <code>true</code> if the given <code>spkac</code> data structure is valid, | |
<code>false</code> otherwise.</li> | |
</ul> | |
@@ -14753,8 +14729,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.11.8</span> | |
</div><ul> | |
-<li><code>spkac</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> The challenge component of the <code>spkac</code> data structure, which | |
+<li><code>spkac</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> The challenge component of the <code>spkac</code> data structure, which | |
includes a public key and a challenge.</li> | |
</ul> | |
<pre><code class="lang-js">const cert = require('crypto').Certificate(); | |
@@ -14767,8 +14743,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.11.8</span> | |
</div><ul> | |
-<li><code>spkac</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> The public key component of the <code>spkac</code> data structure, | |
+<li><code>spkac</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> The public key component of the <code>spkac</code> data structure, | |
which includes a public key and a challenge.</li> | |
</ul> | |
<pre><code class="lang-js">const cert = require('crypto').Certificate(); | |
@@ -14781,7 +14757,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.11.8</span> | |
</div><ul> | |
-<li><code>spkac</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>spkac</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> <code>true</code> if the given <code>spkac</code> data structure is valid, | |
<code>false</code> otherwise.</li> | |
</ul> | |
@@ -14796,12 +14772,12 @@ | |
</div><p>Instances of the <code>Cipher</code> class are used to encrypt data. The class can be | |
used in one of two ways:</p> | |
<ul> | |
-<li>As a <a href="stream.html#stream_stream">stream</a> that is both readable and writable, where plain unencrypted | |
+<li>As a <a href="stream.html">stream</a> that is both readable and writable, where plain unencrypted | |
data is written to produce encrypted data on the readable side, or</li> | |
<li>Using the <a href="#crypto_cipher_update_data_inputencoding_outputencoding"><code>cipher.update()</code></a> and <a href="#crypto_cipher_final_outputencoding"><code>cipher.final()</code></a> methods to produce | |
the encrypted data.</li> | |
</ul> | |
-<p>The <a href="crypto.html#crypto_crypto_createcipher_algorithm_password_options"><code>crypto.createCipher()</code></a> or <a href="crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options"><code>crypto.createCipheriv()</code></a> methods are | |
+<p>The <a href="#crypto_crypto_createcipher_algorithm_password_options"><code>crypto.createCipher()</code></a> or <a href="#crypto_crypto_createcipheriv_algorithm_key_iv_options"><code>crypto.createCipheriv()</code></a> methods are | |
used to create <code>Cipher</code> instances. <code>Cipher</code> objects are not to be created | |
directly using the <code>new</code> keyword.</p> | |
<p>Example: Using <code>Cipher</code> objects as streams:</p> | |
@@ -14846,9 +14822,9 @@ | |
<span>Added in: v0.1.94</span> | |
</div><ul> | |
<li><code>outputEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Any remaining enciphered contents. | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Any remaining enciphered contents. | |
If <code>outputEncoding</code> is one of <code>'latin1'</code>, <code>'base64'</code> or <code>'hex'</code>, a string is | |
-returned. If an <code>outputEncoding</code> is not provided, a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> is returned.</li> | |
+returned. If an <code>outputEncoding</code> is not provided, a <a href="buffer.html"><code>Buffer</code></a> is returned.</li> | |
</ul> | |
<p>Once the <code>cipher.final()</code> method has been called, the <code>Cipher</code> object can no | |
longer be used to encrypt data. Attempts to call <code>cipher.final()</code> more than | |
@@ -14857,12 +14833,12 @@ | |
<div class="api_metadata"> | |
<span>Added in: v1.0.0</span> | |
</div><ul> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
-<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="stream.html#stream_new_stream_transform_options"><code>stream.transform</code> options</a><ul> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="#stream_new_stream_transform_options"><code>stream.transform</code> options</a><ul> | |
<li><code>plaintextLength</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="crypto.html#crypto_class_cipher" class="type"><Cipher></a> for method chaining.</li> | |
+<li>Returns: <a href="#crypto_class_cipher" class="type"><Cipher></a> for method chaining.</li> | |
</ul> | |
<p>When using an authenticated encryption mode (only <code>GCM</code> and <code>CCM</code> are currently | |
supported), the <code>cipher.setAAD()</code> method sets the value used for the | |
@@ -14875,9 +14851,9 @@ | |
<div class="api_metadata"> | |
<span>Added in: v1.0.0</span> | |
</div><ul> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> When using an authenticated encryption mode (only <code>GCM</code> and | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> When using an authenticated encryption mode (only <code>GCM</code> and | |
<code>CCM</code> are currently supported), the <code>cipher.getAuthTag()</code> method returns a | |
-<a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> containing the <em>authentication tag</em> that has been computed from | |
+<a href="buffer.html"><code>Buffer</code></a> containing the <em>authentication tag</em> that has been computed from | |
the given data.</li> | |
</ul> | |
<p>The <code>cipher.getAuthTag()</code> method should only be called after encryption has | |
@@ -14887,7 +14863,7 @@ | |
<span>Added in: v0.7.1</span> | |
</div><ul> | |
<li><code>autoPadding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> <strong>Default:</strong> <code>true</code></li> | |
-<li>Returns: <a href="crypto.html#crypto_class_cipher" class="type"><Cipher></a> for method chaining.</li> | |
+<li>Returns: <a href="#crypto_class_cipher" class="type"><Cipher></a> for method chaining.</li> | |
</ul> | |
<p>When using block encryption algorithms, the <code>Cipher</code> class will automatically | |
add padding to the input data to the appropriate block size. To disable the | |
@@ -14912,21 +14888,21 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>inputEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>outputEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Updates the cipher with <code>data</code>. If the <code>inputEncoding</code> argument is given, | |
its value must be one of <code>'utf8'</code>, <code>'ascii'</code>, or <code>'latin1'</code> and the <code>data</code> | |
argument is a string using the specified encoding. If the <code>inputEncoding</code> | |
-argument is not given, <code>data</code> must be a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, <code>TypedArray</code>, or | |
-<code>DataView</code>. If <code>data</code> is a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, <code>TypedArray</code>, or <code>DataView</code>, then | |
+argument is not given, <code>data</code> must be a <a href="buffer.html"><code>Buffer</code></a>, <code>TypedArray</code>, or | |
+<code>DataView</code>. If <code>data</code> is a <a href="buffer.html"><code>Buffer</code></a>, <code>TypedArray</code>, or <code>DataView</code>, then | |
<code>inputEncoding</code> is ignored.</p> | |
<p>The <code>outputEncoding</code> specifies the output format of the enciphered | |
data, and can be <code>'latin1'</code>, <code>'base64'</code> or <code>'hex'</code>. If the <code>outputEncoding</code> | |
is specified, a string using the specified encoding is returned. If no | |
-<code>outputEncoding</code> is provided, a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> is returned.</p> | |
+<code>outputEncoding</code> is provided, a <a href="buffer.html"><code>Buffer</code></a> is returned.</p> | |
<p>The <code>cipher.update()</code> method can be called multiple times with new data until | |
<a href="#crypto_cipher_final_outputencoding"><code>cipher.final()</code></a> is called. Calling <code>cipher.update()</code> after | |
<a href="#crypto_cipher_final_outputencoding"><code>cipher.final()</code></a> will result in an error being thrown.</p> | |
@@ -14936,12 +14912,12 @@ | |
</div><p>Instances of the <code>Decipher</code> class are used to decrypt data. The class can be | |
used in one of two ways:</p> | |
<ul> | |
-<li>As a <a href="stream.html#stream_stream">stream</a> that is both readable and writable, where plain encrypted | |
+<li>As a <a href="stream.html">stream</a> that is both readable and writable, where plain encrypted | |
data is written to produce unencrypted data on the readable side, or</li> | |
-<li>Using the <a href="#crypto_decipher_update_data_inputencoding_outputencoding"><code>decipher.update()</code></a> and <a href="crypto.html#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a> methods to | |
+<li>Using the <a href="#crypto_decipher_update_data_inputencoding_outputencoding"><code>decipher.update()</code></a> and <a href="#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a> methods to | |
produce the unencrypted data.</li> | |
</ul> | |
-<p>The <a href="crypto.html#crypto_crypto_createdecipher_algorithm_password_options"><code>crypto.createDecipher()</code></a> or <a href="crypto.html#crypto_crypto_createdecipheriv_algorithm_key_iv_options"><code>crypto.createDecipheriv()</code></a> methods are | |
+<p>The <a href="#crypto_crypto_createdecipher_algorithm_password_options"><code>crypto.createDecipher()</code></a> or <a href="#crypto_crypto_createdecipheriv_algorithm_key_iv_options"><code>crypto.createDecipheriv()</code></a> methods are | |
used to create <code>Decipher</code> instances. <code>Decipher</code> objects are not to be created | |
directly using the <code>new</code> keyword.</p> | |
<p>Example: Using <code>Decipher</code> objects as streams:</p> | |
@@ -14974,7 +14950,7 @@ | |
input.pipe(decipher).pipe(output); | |
</code></pre> | |
-<p>Example: Using the <a href="#crypto_decipher_update_data_inputencoding_outputencoding"><code>decipher.update()</code></a> and <a href="crypto.html#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a> methods:</p> | |
+<p>Example: Using the <a href="#crypto_decipher_update_data_inputencoding_outputencoding"><code>decipher.update()</code></a> and <a href="#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a> methods:</p> | |
<pre><code class="lang-js">const crypto = require('crypto'); | |
const decipher = crypto.createDecipher('aes192', 'a password'); | |
@@ -14990,9 +14966,9 @@ | |
<span>Added in: v0.1.94</span> | |
</div><ul> | |
<li><code>outputEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Any remaining deciphered contents. | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Any remaining deciphered contents. | |
If <code>outputEncoding</code> is one of <code>'latin1'</code>, <code>'ascii'</code> or <code>'utf8'</code>, a string is | |
-returned. If an <code>outputEncoding</code> is not provided, a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> is returned.</li> | |
+returned. If an <code>outputEncoding</code> is not provided, a <a href="buffer.html"><code>Buffer</code></a> is returned.</li> | |
</ul> | |
<p>Once the <code>decipher.final()</code> method has been called, the <code>Decipher</code> object can | |
no longer be used to decrypt data. Attempts to call <code>decipher.final()</code> more | |
@@ -15011,12 +14987,12 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="stream.html#stream_new_stream_transform_options"><code>stream.transform</code> options</a><ul> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="#stream_new_stream_transform_options"><code>stream.transform</code> options</a><ul> | |
<li><code>plaintextLength</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="crypto.html#crypto_class_decipher" class="type"><Decipher></a> for method chaining.</li> | |
+<li>Returns: <a href="#crypto_class_decipher" class="type"><Decipher></a> for method chaining.</li> | |
</ul> | |
<p>When using an authenticated encryption mode (only <code>GCM</code> and <code>CCM</code> are currently | |
supported), the <code>decipher.setAAD()</code> method sets the value used for the | |
@@ -15042,32 +15018,32 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li>Returns: <a href="crypto.html#crypto_class_decipher" class="type"><Decipher></a> for method chaining.</li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li>Returns: <a href="#crypto_class_decipher" class="type"><Decipher></a> for method chaining.</li> | |
</ul> | |
<p>When using an authenticated encryption mode (only <code>GCM</code> and <code>CCM</code> are currently | |
supported), the <code>decipher.setAuthTag()</code> method is used to pass in the | |
received <em>authentication tag</em>. If no tag is provided, or if the cipher text | |
-has been tampered with, <a href="crypto.html#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a> will throw, indicating that the | |
+has been tampered with, <a href="#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a> will throw, indicating that the | |
cipher text should be discarded due to failed authentication. If the tag length | |
is invalid according to <a href="http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf">NIST SP 800-38D</a> or does not match the value of the | |
<code>authTagLength</code> option, <code>decipher.setAuthTag()</code> will throw an error.</p> | |
<p>The <code>decipher.setAuthTag()</code> method must be called before | |
-<a href="crypto.html#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a>.</p> | |
+<a href="#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a>.</p> | |
<h3>decipher.setAutoPadding([autoPadding])<span><a class="mark" href="#crypto_decipher_setautopadding_autopadding" id="crypto_decipher_setautopadding_autopadding">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.7.1</span> | |
</div><ul> | |
<li><code>autoPadding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> <strong>Default:</strong> <code>true</code></li> | |
-<li>Returns: <a href="crypto.html#crypto_class_decipher" class="type"><Decipher></a> for method chaining.</li> | |
+<li>Returns: <a href="#crypto_class_decipher" class="type"><Decipher></a> for method chaining.</li> | |
</ul> | |
<p>When data has been encrypted without standard block padding, calling | |
<code>decipher.setAutoPadding(false)</code> will disable automatic padding to prevent | |
-<a href="crypto.html#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a> from checking for and removing padding.</p> | |
+<a href="#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a> from checking for and removing padding.</p> | |
<p>Turning auto padding off will only work if the input data's length is a | |
multiple of the ciphers block size.</p> | |
<p>The <code>decipher.setAutoPadding()</code> method must be called before | |
-<a href="crypto.html#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a>.</p> | |
+<a href="#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a>.</p> | |
<h3>decipher.update(data[, inputEncoding][, outputEncoding])<span><a class="mark" href="#crypto_decipher_update_data_inputencoding_outputencoding" id="crypto_decipher_update_data_inputencoding_outputencoding">#</a></span></h3> | |
<div class="api_metadata"> | |
<details class="changelog"><summary>History</summary> | |
@@ -15082,23 +15058,23 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>inputEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>outputEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Updates the decipher with <code>data</code>. If the <code>inputEncoding</code> argument is given, | |
its value must be one of <code>'latin1'</code>, <code>'base64'</code>, or <code>'hex'</code> and the <code>data</code> | |
argument is a string using the specified encoding. If the <code>inputEncoding</code> | |
-argument is not given, <code>data</code> must be a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>. If <code>data</code> is a | |
-<a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> then <code>inputEncoding</code> is ignored.</p> | |
+argument is not given, <code>data</code> must be a <a href="buffer.html"><code>Buffer</code></a>. If <code>data</code> is a | |
+<a href="buffer.html"><code>Buffer</code></a> then <code>inputEncoding</code> is ignored.</p> | |
<p>The <code>outputEncoding</code> specifies the output format of the enciphered | |
data, and can be <code>'latin1'</code>, <code>'ascii'</code> or <code>'utf8'</code>. If the <code>outputEncoding</code> | |
is specified, a string using the specified encoding is returned. If no | |
-<code>outputEncoding</code> is provided, a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> is returned.</p> | |
+<code>outputEncoding</code> is provided, a <a href="buffer.html"><code>Buffer</code></a> is returned.</p> | |
<p>The <code>decipher.update()</code> method can be called multiple times with new data until | |
-<a href="crypto.html#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a> is called. Calling <code>decipher.update()</code> after | |
-<a href="crypto.html#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a> will result in an error being thrown.</p> | |
+<a href="#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a> is called. Calling <code>decipher.update()</code> after | |
+<a href="#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a> will result in an error being thrown.</p> | |
<h2>Class: DiffieHellman<span><a class="mark" href="#crypto_class_diffiehellman" id="crypto_class_diffiehellman">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.5.0</span> | |
@@ -15128,94 +15104,94 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.5.0</span> | |
</div><ul> | |
-<li><code>otherPublicKey</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>otherPublicKey</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>inputEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>outputEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Computes the shared secret using <code>otherPublicKey</code> as the other | |
party's public key and returns the computed shared secret. The supplied | |
key is interpreted using the specified <code>inputEncoding</code>, and secret is | |
encoded using specified <code>outputEncoding</code>. Encodings can be | |
<code>'latin1'</code>, <code>'hex'</code>, or <code>'base64'</code>. If the <code>inputEncoding</code> is not | |
-provided, <code>otherPublicKey</code> is expected to be a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, | |
+provided, <code>otherPublicKey</code> is expected to be a <a href="buffer.html"><code>Buffer</code></a>, | |
<code>TypedArray</code>, or <code>DataView</code>.</p> | |
<p>If <code>outputEncoding</code> is given a string is returned; otherwise, a | |
-<a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> is returned.</p> | |
+<a href="buffer.html"><code>Buffer</code></a> is returned.</p> | |
<h3>diffieHellman.generateKeys([encoding])<span><a class="mark" href="#crypto_diffiehellman_generatekeys_encoding" id="crypto_diffiehellman_generatekeys_encoding">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.5.0</span> | |
</div><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Generates private and public Diffie-Hellman key values, and returns | |
the public key in the specified <code>encoding</code>. This key should be | |
transferred to the other party. Encoding can be <code>'latin1'</code>, <code>'hex'</code>, | |
or <code>'base64'</code>. If <code>encoding</code> is provided a string is returned; otherwise a | |
-<a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> is returned.</p> | |
+<a href="buffer.html"><code>Buffer</code></a> is returned.</p> | |
<h3>diffieHellman.getGenerator([encoding])<span><a class="mark" href="#crypto_diffiehellman_getgenerator_encoding" id="crypto_diffiehellman_getgenerator_encoding">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.5.0</span> | |
</div><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Returns the Diffie-Hellman generator in the specified <code>encoding</code>, which can | |
be <code>'latin1'</code>, <code>'hex'</code>, or <code>'base64'</code>. If <code>encoding</code> is provided a string is | |
-returned; otherwise a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> is returned.</p> | |
+returned; otherwise a <a href="buffer.html"><code>Buffer</code></a> is returned.</p> | |
<h3>diffieHellman.getPrime([encoding])<span><a class="mark" href="#crypto_diffiehellman_getprime_encoding" id="crypto_diffiehellman_getprime_encoding">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.5.0</span> | |
</div><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Returns the Diffie-Hellman prime in the specified <code>encoding</code>, which can | |
be <code>'latin1'</code>, <code>'hex'</code>, or <code>'base64'</code>. If <code>encoding</code> is provided a string is | |
-returned; otherwise a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> is returned.</p> | |
+returned; otherwise a <a href="buffer.html"><code>Buffer</code></a> is returned.</p> | |
<h3>diffieHellman.getPrivateKey([encoding])<span><a class="mark" href="#crypto_diffiehellman_getprivatekey_encoding" id="crypto_diffiehellman_getprivatekey_encoding">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.5.0</span> | |
</div><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Returns the Diffie-Hellman private key in the specified <code>encoding</code>, | |
which can be <code>'latin1'</code>, <code>'hex'</code>, or <code>'base64'</code>. If <code>encoding</code> is provided a | |
-string is returned; otherwise a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> is returned.</p> | |
+string is returned; otherwise a <a href="buffer.html"><code>Buffer</code></a> is returned.</p> | |
<h3>diffieHellman.getPublicKey([encoding])<span><a class="mark" href="#crypto_diffiehellman_getpublickey_encoding" id="crypto_diffiehellman_getpublickey_encoding">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.5.0</span> | |
</div><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Returns the Diffie-Hellman public key in the specified <code>encoding</code>, which | |
can be <code>'latin1'</code>, <code>'hex'</code>, or <code>'base64'</code>. If <code>encoding</code> is provided a | |
-string is returned; otherwise a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> is returned.</p> | |
+string is returned; otherwise a <a href="buffer.html"><code>Buffer</code></a> is returned.</p> | |
<h3>diffieHellman.setPrivateKey(privateKey[, encoding])<span><a class="mark" href="#crypto_diffiehellman_setprivatekey_privatekey_encoding" id="crypto_diffiehellman_setprivatekey_privatekey_encoding">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.5.0</span> | |
</div><ul> | |
-<li><code>privateKey</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>privateKey</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Sets the Diffie-Hellman private key. If the <code>encoding</code> argument is provided | |
and is either <code>'latin1'</code>, <code>'hex'</code>, or <code>'base64'</code>, <code>privateKey</code> is expected | |
to be a string. If no <code>encoding</code> is provided, <code>privateKey</code> is expected | |
-to be a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, <code>TypedArray</code>, or <code>DataView</code>.</p> | |
+to be a <a href="buffer.html"><code>Buffer</code></a>, <code>TypedArray</code>, or <code>DataView</code>.</p> | |
<h3>diffieHellman.setPublicKey(publicKey[, encoding])<span><a class="mark" href="#crypto_diffiehellman_setpublickey_publickey_encoding" id="crypto_diffiehellman_setpublickey_publickey_encoding">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.5.0</span> | |
</div><ul> | |
-<li><code>publicKey</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>publicKey</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Sets the Diffie-Hellman public key. If the <code>encoding</code> argument is provided | |
and is either <code>'latin1'</code>, <code>'hex'</code> or <code>'base64'</code>, <code>publicKey</code> is expected | |
to be a string. If no <code>encoding</code> is provided, <code>publicKey</code> is expected | |
-to be a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, <code>TypedArray</code>, or <code>DataView</code>.</p> | |
+to be a <a href="buffer.html"><code>Buffer</code></a>, <code>TypedArray</code>, or <code>DataView</code>.</p> | |
<h3>diffieHellman.verifyError<span><a class="mark" href="#crypto_diffiehellman_verifyerror" id="crypto_diffiehellman_verifyerror">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.11.12</span> | |
@@ -15258,12 +15234,12 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>key</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>key</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>curve</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>inputEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>outputEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>format</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'uncompressed'</code></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Converts the EC Diffie-Hellman public key specified by <code>key</code> and <code>curve</code> to the | |
format specified by <code>format</code>. The <code>format</code> argument specifies point encoding | |
@@ -15271,12 +15247,12 @@ | |
interpreted using the specified <code>inputEncoding</code>, and the returned key is encoded | |
using the specified <code>outputEncoding</code>. Encodings can be <code>'latin1'</code>, <code>'hex'</code>, | |
or <code>'base64'</code>.</p> | |
-<p>Use <a href="crypto.html#crypto_crypto_getcurves"><code>crypto.getCurves()</code></a> to obtain a list of available curve names. | |
+<p>Use <a href="#crypto_crypto_getcurves"><code>crypto.getCurves()</code></a> to obtain a list of available curve names. | |
On recent OpenSSL releases, <code>openssl ecparam -list_curves</code> will also display | |
the name and description of each available elliptic curve.</p> | |
<p>If <code>format</code> is not specified the point will be returned in <code>'uncompressed'</code> | |
format.</p> | |
-<p>If the <code>inputEncoding</code> is not provided, <code>key</code> is expected to be a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, | |
+<p>If the <code>inputEncoding</code> is not provided, <code>key</code> is expected to be a <a href="buffer.html"><code>Buffer</code></a>, | |
<code>TypedArray</code>, or <code>DataView</code>.</p> | |
<p>Example (uncompressing a key):</p> | |
<pre><code class="lang-js">const { ECDH } = require('crypto'); | |
@@ -15312,20 +15288,20 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>otherPublicKey</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>otherPublicKey</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>inputEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>outputEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Computes the shared secret using <code>otherPublicKey</code> as the other | |
party's public key and returns the computed shared secret. The supplied | |
key is interpreted using specified <code>inputEncoding</code>, and the returned secret | |
is encoded using the specified <code>outputEncoding</code>. Encodings can be | |
<code>'latin1'</code>, <code>'hex'</code>, or <code>'base64'</code>. If the <code>inputEncoding</code> is not | |
-provided, <code>otherPublicKey</code> is expected to be a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, <code>TypedArray</code>, or | |
+provided, <code>otherPublicKey</code> is expected to be a <a href="buffer.html"><code>Buffer</code></a>, <code>TypedArray</code>, or | |
<code>DataView</code>.</p> | |
<p>If <code>outputEncoding</code> is given a string will be returned; otherwise a | |
-<a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> is returned.</p> | |
+<a href="buffer.html"><code>Buffer</code></a> is returned.</p> | |
<p><code>ecdh.computeSecret</code> will throw an | |
<code>ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY</code> error when <code>otherPublicKey</code> | |
lies outside of the elliptic curve. Since <code>otherPublicKey</code> is | |
@@ -15337,7 +15313,7 @@ | |
</div><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>format</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'uncompressed'</code></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Generates private and public EC Diffie-Hellman key values, and returns | |
the public key in the specified <code>format</code> and <code>encoding</code>. This key should be | |
@@ -15346,16 +15322,16 @@ | |
<code>'uncompressed'</code>. If <code>format</code> is not specified, the point will be returned in | |
<code>'uncompressed'</code> format.</p> | |
<p>The <code>encoding</code> argument can be <code>'latin1'</code>, <code>'hex'</code>, or <code>'base64'</code>. If | |
-<code>encoding</code> is provided a string is returned; otherwise a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> | |
+<code>encoding</code> is provided a string is returned; otherwise a <a href="buffer.html"><code>Buffer</code></a> | |
is returned.</p> | |
<h3>ecdh.getPrivateKey([encoding])<span><a class="mark" href="#crypto_ecdh_getprivatekey_encoding" id="crypto_ecdh_getprivatekey_encoding">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.11.14</span> | |
</div><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The EC Diffie-Hellman private key in the specified | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The EC Diffie-Hellman private key in the specified | |
<code>encoding</code>, which can be <code>'latin1'</code>, <code>'hex'</code>, or <code>'base64'</code>. If <code>encoding</code> | |
-is provided a string is returned; otherwise a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> is returned.</li> | |
+is provided a string is returned; otherwise a <a href="buffer.html"><code>Buffer</code></a> is returned.</li> | |
</ul> | |
<h3>ecdh.getPublicKey([encoding][, format])<span><a class="mark" href="#crypto_ecdh_getpublickey_encoding_format" id="crypto_ecdh_getpublickey_encoding_format">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -15363,25 +15339,25 @@ | |
</div><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>format</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'uncompressed'</code></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The EC Diffie-Hellman public key in the specified | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The EC Diffie-Hellman public key in the specified | |
<code>encoding</code> and <code>format</code>.</li> | |
</ul> | |
<p>The <code>format</code> argument specifies point encoding and can be <code>'compressed'</code> or | |
<code>'uncompressed'</code>. If <code>format</code> is not specified the point will be returned in | |
<code>'uncompressed'</code> format.</p> | |
<p>The <code>encoding</code> argument can be <code>'latin1'</code>, <code>'hex'</code>, or <code>'base64'</code>. If | |
-<code>encoding</code> is specified, a string is returned; otherwise a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> is | |
+<code>encoding</code> is specified, a string is returned; otherwise a <a href="buffer.html"><code>Buffer</code></a> is | |
returned.</p> | |
<h3>ecdh.setPrivateKey(privateKey[, encoding])<span><a class="mark" href="#crypto_ecdh_setprivatekey_privatekey_encoding" id="crypto_ecdh_setprivatekey_privatekey_encoding">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.11.14</span> | |
</div><ul> | |
-<li><code>privateKey</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>privateKey</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Sets the EC Diffie-Hellman private key. The <code>encoding</code> can be <code>'latin1'</code>, | |
<code>'hex'</code> or <code>'base64'</code>. If <code>encoding</code> is provided, <code>privateKey</code> is expected | |
-to be a string; otherwise <code>privateKey</code> is expected to be a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, | |
+to be a string; otherwise <code>privateKey</code> is expected to be a <a href="buffer.html"><code>Buffer</code></a>, | |
<code>TypedArray</code>, or <code>DataView</code>.</p> | |
<p>If <code>privateKey</code> is not valid for the curve specified when the <code>ECDH</code> object was | |
created, an error is thrown. Upon setting the private key, the associated | |
@@ -15389,13 +15365,13 @@ | |
<h3>ecdh.setPublicKey(publicKey[, encoding])<span><a class="mark" href="#crypto_ecdh_setpublickey_publickey_encoding" id="crypto_ecdh_setpublickey_publickey_encoding">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.11.14</span><span>Deprecated since: v5.2.0</span> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated</div><ul> | |
-<li><code>publicKey</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated</div><ul> | |
+<li><code>publicKey</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Sets the EC Diffie-Hellman public key. Key encoding can be <code>'latin1'</code>, | |
<code>'hex'</code> or <code>'base64'</code>. If <code>encoding</code> is provided <code>publicKey</code> is expected to | |
-be a string; otherwise a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, <code>TypedArray</code>, or <code>DataView</code> is expected.</p> | |
+be a string; otherwise a <a href="buffer.html"><code>Buffer</code></a>, <code>TypedArray</code>, or <code>DataView</code> is expected.</p> | |
<p>Note that there is not normally a reason to call this method because <code>ECDH</code> | |
only requires a private key and the other party's public key to compute the | |
shared secret. Typically either <a href="#crypto_ecdh_generatekeys_encoding_format"><code>ecdh.generateKeys()</code></a> or | |
@@ -15430,9 +15406,9 @@ | |
</div><p>The <code>Hash</code> class is a utility for creating hash digests of data. It can be | |
used in one of two ways:</p> | |
<ul> | |
-<li>As a <a href="stream.html#stream_stream">stream</a> that is both readable and writable, where data is written | |
+<li>As a <a href="stream.html">stream</a> that is both readable and writable, where data is written | |
to produce a computed hash digest on the readable side, or</li> | |
-<li>Using the <a href="crypto.html#crypto_hash_update_data_inputencoding"><code>hash.update()</code></a> and <a href="crypto.html#crypto_hash_digest_encoding"><code>hash.digest()</code></a> methods to produce the | |
+<li>Using the <a href="#crypto_hash_update_data_inputencoding"><code>hash.update()</code></a> and <a href="#crypto_hash_digest_encoding"><code>hash.digest()</code></a> methods to produce the | |
computed hash.</li> | |
</ul> | |
<p>The <a href="#crypto_crypto_createhash_algorithm_options"><code>crypto.createHash()</code></a> method is used to create <code>Hash</code> instances. <code>Hash</code> | |
@@ -15461,7 +15437,7 @@ | |
const input = fs.createReadStream('test.js'); | |
input.pipe(hash).pipe(process.stdout); | |
</code></pre> | |
-<p>Example: Using the <a href="crypto.html#crypto_hash_update_data_inputencoding"><code>hash.update()</code></a> and <a href="crypto.html#crypto_hash_digest_encoding"><code>hash.digest()</code></a> methods:</p> | |
+<p>Example: Using the <a href="#crypto_hash_update_data_inputencoding"><code>hash.update()</code></a> and <a href="#crypto_hash_digest_encoding"><code>hash.digest()</code></a> methods:</p> | |
<pre><code class="lang-js">const crypto = require('crypto'); | |
const hash = crypto.createHash('sha256'); | |
@@ -15475,12 +15451,12 @@ | |
<span>Added in: v0.1.92</span> | |
</div><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Calculates the digest of all of the data passed to be hashed (using the | |
-<a href="crypto.html#crypto_hash_update_data_inputencoding"><code>hash.update()</code></a> method). The <code>encoding</code> can be <code>'hex'</code>, <code>'latin1'</code> or | |
+<a href="#crypto_hash_update_data_inputencoding"><code>hash.update()</code></a> method). The <code>encoding</code> can be <code>'hex'</code>, <code>'latin1'</code> or | |
<code>'base64'</code>. If <code>encoding</code> is provided a string will be returned; otherwise | |
-a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> is returned.</p> | |
+a <a href="buffer.html"><code>Buffer</code></a> is returned.</p> | |
<p>The <code>Hash</code> object can not be used again after <code>hash.digest()</code> method has been | |
called. Multiple calls will cause an error to be thrown.</p> | |
<h3>hash.update(data[, inputEncoding])<span><a class="mark" href="#crypto_hash_update_data_inputencoding" id="crypto_hash_update_data_inputencoding">#</a></span></h3> | |
@@ -15497,13 +15473,13 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>inputEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Updates the hash content with the given <code>data</code>, the encoding of which | |
is given in <code>inputEncoding</code> and can be <code>'utf8'</code>, <code>'ascii'</code> or | |
<code>'latin1'</code>. If <code>encoding</code> is not provided, and the <code>data</code> is a string, an | |
-encoding of <code>'utf8'</code> is enforced. If <code>data</code> is a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, <code>TypedArray</code>, or | |
+encoding of <code>'utf8'</code> is enforced. If <code>data</code> is a <a href="buffer.html"><code>Buffer</code></a>, <code>TypedArray</code>, or | |
<code>DataView</code>, then <code>inputEncoding</code> is ignored.</p> | |
<p>This can be called many times with new data as it is streamed.</p> | |
<h2>Class: Hmac<span><a class="mark" href="#crypto_class_hmac" id="crypto_class_hmac">#</a></span></h2> | |
@@ -15512,7 +15488,7 @@ | |
</div><p>The <code>Hmac</code> Class is a utility for creating cryptographic HMAC digests. It can | |
be used in one of two ways:</p> | |
<ul> | |
-<li>As a <a href="stream.html#stream_stream">stream</a> that is both readable and writable, where data is written | |
+<li>As a <a href="stream.html">stream</a> that is both readable and writable, where data is written | |
to produce a computed HMAC digest on the readable side, or</li> | |
<li>Using the <a href="#crypto_hmac_update_data_inputencoding"><code>hmac.update()</code></a> and <a href="#crypto_hmac_digest_encoding"><code>hmac.digest()</code></a> methods to produce the | |
computed HMAC digest.</li> | |
@@ -15557,11 +15533,11 @@ | |
<span>Added in: v0.1.94</span> | |
</div><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Calculates the HMAC digest of all of the data passed using <a href="#crypto_hmac_update_data_inputencoding"><code>hmac.update()</code></a>. | |
The <code>encoding</code> can be <code>'hex'</code>, <code>'latin1'</code> or <code>'base64'</code>. If <code>encoding</code> is | |
-provided a string is returned; otherwise a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> is returned;</p> | |
+provided a string is returned; otherwise a <a href="buffer.html"><code>Buffer</code></a> is returned;</p> | |
<p>The <code>Hmac</code> object can not be used again after <code>hmac.digest()</code> has been | |
called. Multiple calls to <code>hmac.digest()</code> will result in an error being thrown.</p> | |
<h3>hmac.update(data[, inputEncoding])<span><a class="mark" href="#crypto_hmac_update_data_inputencoding" id="crypto_hmac_update_data_inputencoding">#</a></span></h3> | |
@@ -15578,13 +15554,13 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>inputEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Updates the <code>Hmac</code> content with the given <code>data</code>, the encoding of which | |
is given in <code>inputEncoding</code> and can be <code>'utf8'</code>, <code>'ascii'</code> or | |
<code>'latin1'</code>. If <code>encoding</code> is not provided, and the <code>data</code> is a string, an | |
-encoding of <code>'utf8'</code> is enforced. If <code>data</code> is a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, <code>TypedArray</code>, or | |
+encoding of <code>'utf8'</code> is enforced. If <code>data</code> is a <a href="buffer.html"><code>Buffer</code></a>, <code>TypedArray</code>, or | |
<code>DataView</code>, then <code>inputEncoding</code> is ignored.</p> | |
<p>This can be called many times with new data as it is streamed.</p> | |
<h2>Class: Sign<span><a class="mark" href="#crypto_class_sign" id="crypto_class_sign">#</a></span></h2> | |
@@ -15593,9 +15569,9 @@ | |
</div><p>The <code>Sign</code> Class is a utility for generating signatures. It can be used in one | |
of two ways:</p> | |
<ul> | |
-<li>As a writable <a href="stream.html#stream_stream">stream</a>, where data to be signed is written and the | |
-<a href="crypto.html#crypto_sign_sign_privatekey_outputformat"><code>sign.sign()</code></a> method is used to generate and return the signature, or</li> | |
-<li>Using the <a href="#crypto_sign_update_data_inputencoding"><code>sign.update()</code></a> and <a href="crypto.html#crypto_sign_sign_privatekey_outputformat"><code>sign.sign()</code></a> methods to produce the | |
+<li>As a writable <a href="stream.html">stream</a>, where data to be signed is written and the | |
+<a href="#crypto_sign_sign_privatekey_outputformat"><code>sign.sign()</code></a> method is used to generate and return the signature, or</li> | |
+<li>Using the <a href="#crypto_sign_update_data_inputencoding"><code>sign.update()</code></a> and <a href="#crypto_sign_sign_privatekey_outputformat"><code>sign.sign()</code></a> methods to produce the | |
signature.</li> | |
</ul> | |
<p>The <a href="#crypto_crypto_createsign_algorithm_options"><code>crypto.createSign()</code></a> method is used to create <code>Sign</code> instances. The | |
@@ -15614,7 +15590,7 @@ | |
// SHA-256. For RSA keys, the algorithm is RSASSA-PKCS1-v1_5 (see padding | |
// parameter below for RSASSA-PSS). For EC keys, the algorithm is ECDSA. | |
</code></pre> | |
-<p>Example: Using the <a href="#crypto_sign_update_data_inputencoding"><code>sign.update()</code></a> and <a href="crypto.html#crypto_sign_sign_privatekey_outputformat"><code>sign.sign()</code></a> methods:</p> | |
+<p>Example: Using the <a href="#crypto_sign_update_data_inputencoding"><code>sign.update()</code></a> and <a href="#crypto_sign_sign_privatekey_outputformat"><code>sign.sign()</code></a> methods:</p> | |
<pre><code class="lang-js">const crypto = require('crypto'); | |
const sign = crypto.createSign('SHA256'); | |
@@ -15658,10 +15634,10 @@ | |
</ul> | |
</li> | |
<li><code>outputFormat</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Calculates the signature on all the data passed through using either | |
-<a href="#crypto_sign_update_data_inputencoding"><code>sign.update()</code></a> or <a href="stream.html#stream_writable_write_chunk_encoding_callback"><code>sign.write()</code></a>.</p> | |
+<a href="#crypto_sign_update_data_inputencoding"><code>sign.update()</code></a> or <a href="#stream_writable_write_chunk_encoding_callback"><code>sign.write()</code></a>.</p> | |
<p>The <code>privateKey</code> argument can be an object or a string. If <code>privateKey</code> is a | |
string, it is treated as a raw key with no passphrase. If <code>privateKey</code> is an | |
object, it must contain one or more of the following properties:</p> | |
@@ -15683,7 +15659,7 @@ | |
maximum permissible value.</li> | |
</ul> | |
<p>The <code>outputFormat</code> can specify one of <code>'latin1'</code>, <code>'hex'</code> or <code>'base64'</code>. If | |
-<code>outputFormat</code> is provided a string is returned; otherwise a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> is | |
+<code>outputFormat</code> is provided a string is returned; otherwise a <a href="buffer.html"><code>Buffer</code></a> is | |
returned.</p> | |
<p>The <code>Sign</code> object can not be again used after <code>sign.sign()</code> method has been | |
called. Multiple calls to <code>sign.sign()</code> will result in an error being thrown.</p> | |
@@ -15701,13 +15677,13 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>inputEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Updates the <code>Sign</code> content with the given <code>data</code>, the encoding of which | |
is given in <code>inputEncoding</code> and can be <code>'utf8'</code>, <code>'ascii'</code> or | |
<code>'latin1'</code>. If <code>encoding</code> is not provided, and the <code>data</code> is a string, an | |
-encoding of <code>'utf8'</code> is enforced. If <code>data</code> is a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, <code>TypedArray</code>, or | |
+encoding of <code>'utf8'</code> is enforced. If <code>data</code> is a <a href="buffer.html"><code>Buffer</code></a>, <code>TypedArray</code>, or | |
<code>DataView</code>, then <code>inputEncoding</code> is ignored.</p> | |
<p>This can be called many times with new data as it is streamed.</p> | |
<h2>Class: Verify<span><a class="mark" href="#crypto_class_verify" id="crypto_class_verify">#</a></span></h2> | |
@@ -15716,7 +15692,7 @@ | |
</div><p>The <code>Verify</code> class is a utility for verifying signatures. It can be used in one | |
of two ways:</p> | |
<ul> | |
-<li>As a writable <a href="stream.html#stream_stream">stream</a> where written data is used to validate against the | |
+<li>As a writable <a href="stream.html">stream</a> where written data is used to validate against the | |
supplied signature, or</li> | |
<li>Using the <a href="#crypto_verify_update_data_inputencoding"><code>verify.update()</code></a> and <a href="#crypto_verify_verify_object_signature_signatureformat"><code>verify.verify()</code></a> methods to verify | |
the signature.</li> | |
@@ -15760,13 +15736,13 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>inputEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Updates the <code>Verify</code> content with the given <code>data</code>, the encoding of which | |
is given in <code>inputEncoding</code> and can be <code>'utf8'</code>, <code>'ascii'</code> or | |
<code>'latin1'</code>. If <code>encoding</code> is not provided, and the <code>data</code> is a string, an | |
-encoding of <code>'utf8'</code> is enforced. If <code>data</code> is a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, <code>TypedArray</code>, or | |
+encoding of <code>'utf8'</code> is enforced. If <code>data</code> is a <a href="buffer.html"><code>Buffer</code></a>, <code>TypedArray</code>, or | |
<code>DataView</code>, then <code>inputEncoding</code> is ignored.</p> | |
<p>This can be called many times with new data as it is streamed.</p> | |
<h3>verify.verify(object, signature[, signatureFormat])<span><a class="mark" href="#crypto_verify_verify_object_signature_signatureformat" id="crypto_verify_verify_object_signature_signatureformat">#</a></span></h3> | |
@@ -15784,7 +15760,7 @@ | |
</details> | |
</div><ul> | |
<li><code>object</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> | |
-<li><code>signature</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>signature</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>signatureFormat</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> <code>true</code> or <code>false</code> depending on the validity of the | |
signature for the data and public key.</li> | |
@@ -15812,7 +15788,7 @@ | |
<p>The <code>signature</code> argument is the previously calculated signature for the data, in | |
the <code>signatureFormat</code> which can be <code>'latin1'</code>, <code>'hex'</code> or <code>'base64'</code>. | |
If a <code>signatureFormat</code> is specified, the <code>signature</code> is expected to be a | |
-string; otherwise <code>signature</code> is expected to be a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, | |
+string; otherwise <code>signature</code> is expected to be a <a href="buffer.html"><code>Buffer</code></a>, | |
<code>TypedArray</code>, or <code>DataView</code>.</p> | |
<p>The <code>verify</code> object can not be used again after <code>verify.verify()</code> has been | |
called. Multiple calls to <code>verify.verify()</code> will result in an error being | |
@@ -15830,8 +15806,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.9.3</span><span>Deprecated since: v10.0.0</span> | |
</div><p>The default encoding to use for functions that can take either strings | |
-or <a href="buffer.html#buffer_class_buffer">buffers</a>. The default value is <code>'buffer'</code>, which makes methods | |
-default to <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> objects.</p> | |
+or <a href="buffer.html">buffers</a>. The default value is <code>'buffer'</code>, which makes methods | |
+default to <a href="buffer.html"><code>Buffer</code></a> objects.</p> | |
<p>The <code>crypto.DEFAULT_ENCODING</code> mechanism is provided for backwards compatibility | |
with legacy programs that expect <code>'latin1'</code> to be the default encoding.</p> | |
<p>New applications should expect the default to be <code>'buffer'</code>.</p> | |
@@ -15859,11 +15835,11 @@ | |
</td></tr> | |
</table> | |
</details> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options"><code>crypto.createCipheriv()</code></a> instead.</div><ul> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#crypto_crypto_createcipheriv_algorithm_key_iv_options"><code>crypto.createCipheriv()</code></a> instead.</div><ul> | |
<li><code>algorithm</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li><code>password</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="stream.html#stream_new_stream_transform_options"><code>stream.transform</code> options</a></li> | |
-<li>Returns: <a href="crypto.html#crypto_class_cipher" class="type"><Cipher></a></li> | |
+<li><code>password</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="#stream_new_stream_transform_options"><code>stream.transform</code> options</a></li> | |
+<li>Returns: <a href="#crypto_class_cipher" class="type"><Cipher></a></li> | |
</ul> | |
<p>Creates and returns a <code>Cipher</code> object that uses the given <code>algorithm</code> and | |
<code>password</code>.</p> | |
@@ -15878,7 +15854,7 @@ | |
(<code>openssl list-cipher-algorithms</code> for older versions of OpenSSL) will | |
display the available cipher algorithms.</p> | |
<p>The <code>password</code> is used to derive the cipher key and initialization vector (IV). | |
-The value must be either a <code>'latin1'</code> encoded string, a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, a | |
+The value must be either a <code>'latin1'</code> encoded string, a <a href="buffer.html"><code>Buffer</code></a>, a | |
<code>TypedArray</code>, or a <code>DataView</code>.</p> | |
<p>The implementation of <code>crypto.createCipher()</code> derives keys using the OpenSSL | |
function <a href="https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html"><code>EVP_BytesToKey</code></a> with the digest algorithm set to MD5, one | |
@@ -15888,7 +15864,7 @@ | |
rapidly.</p> | |
<p>In line with OpenSSL's recommendation to use a more modern algorithm instead of | |
<a href="https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html"><code>EVP_BytesToKey</code></a> it is recommended that developers derive a key and IV on | |
-their own using <a href="crypto.html#crypto_crypto_scrypt_password_salt_keylen_options_callback"><code>crypto.scrypt()</code></a> and to use <a href="crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options"><code>crypto.createCipheriv()</code></a> | |
+their own using <a href="#crypto_crypto_scrypt_password_salt_keylen_options_callback"><code>crypto.scrypt()</code></a> and to use <a href="#crypto_crypto_createcipheriv_algorithm_key_iv_options"><code>crypto.createCipheriv()</code></a> | |
to create the <code>Cipher</code> object. Users should not use ciphers with counter mode | |
(e.g. CTR, GCM, or CCM) in <code>crypto.createCipher()</code>. A warning is emitted when | |
they are used in order to avoid the risk of IV reuse that causes | |
@@ -15912,10 +15888,10 @@ | |
</details> | |
</div><ul> | |
<li><code>algorithm</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li><code>key</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li><code>iv</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="stream.html#stream_new_stream_transform_options"><code>stream.transform</code> options</a></li> | |
-<li>Returns: <a href="crypto.html#crypto_class_cipher" class="type"><Cipher></a></li> | |
+<li><code>key</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>iv</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="#stream_new_stream_transform_options"><code>stream.transform</code> options</a></li> | |
+<li>Returns: <a href="#crypto_class_cipher" class="type"><Cipher></a></li> | |
</ul> | |
<p>Creates and returns a <code>Cipher</code> object, with the given <code>algorithm</code>, <code>key</code> and | |
initialization vector (<code>iv</code>).</p> | |
@@ -15931,7 +15907,7 @@ | |
display the available cipher algorithms.</p> | |
<p>The <code>key</code> is the raw key used by the <code>algorithm</code> and <code>iv</code> is an | |
<a href="https://en.wikipedia.org/wiki/Initialization_vector">initialization vector</a>. Both arguments must be <code>'utf8'</code> encoded strings, | |
-<a href="buffer.html#buffer_class_buffer">Buffers</a>, <code>TypedArray</code>, or <code>DataView</code>s. If the cipher does not need | |
+<a href="buffer.html">Buffers</a>, <code>TypedArray</code>, or <code>DataView</code>s. If the cipher does not need | |
an initialization vector, <code>iv</code> may be <code>null</code>.</p> | |
<p>Initialization vectors should be unpredictable and unique; ideally, they will be | |
cryptographically random. They do not have to be secret: IVs are typically just | |
@@ -15942,9 +15918,9 @@ | |
<h3>crypto.createCredentials(details)<span><a class="mark" href="#crypto_crypto_createcredentials_details" id="crypto_crypto_createcredentials_details">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.92</span><span>Deprecated since: v0.11.13</span> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#tls_tls_createsecurecontext_options"><code>tls.createSecureContext()</code></a> instead.</div><ul> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#tls_tls_createsecurecontext_options"><code>tls.createSecureContext()</code></a> instead.</div><ul> | |
<li><code>details</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> Identical to <a href="#tls_tls_createsecurecontext_options"><code>tls.createSecureContext()</code></a>.</li> | |
-<li>Returns: <a href="tls.html#tls_tls_createsecurecontext_options" class="type"><tls.SecureContext></a></li> | |
+<li>Returns: <a href="#tls_tls_createsecurecontext_options" class="type"><tls.SecureContext></a></li> | |
</ul> | |
<p>The <code>crypto.createCredentials()</code> method is a deprecated function for creating | |
and returning a <code>tls.SecureContext</code>. It should not be used. Replace it with | |
@@ -15955,11 +15931,11 @@ | |
<h3>crypto.createDecipher(algorithm, password[, options])<span><a class="mark" href="#crypto_crypto_createdecipher_algorithm_password_options" id="crypto_crypto_createdecipher_algorithm_password_options">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.94</span><span>Deprecated since: v10.0.0</span> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="crypto.html#crypto_crypto_createdecipheriv_algorithm_key_iv_options"><code>crypto.createDecipheriv()</code></a> instead.</div><ul> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#crypto_crypto_createdecipheriv_algorithm_key_iv_options"><code>crypto.createDecipheriv()</code></a> instead.</div><ul> | |
<li><code>algorithm</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li><code>password</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="stream.html#stream_new_stream_transform_options"><code>stream.transform</code> options</a></li> | |
-<li>Returns: <a href="crypto.html#crypto_class_decipher" class="type"><Decipher></a></li> | |
+<li><code>password</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="#stream_new_stream_transform_options"><code>stream.transform</code> options</a></li> | |
+<li>Returns: <a href="#crypto_class_decipher" class="type"><Decipher></a></li> | |
</ul> | |
<p>Creates and returns a <code>Decipher</code> object that uses the given <code>algorithm</code> and | |
<code>password</code> (key).</p> | |
@@ -15975,7 +15951,7 @@ | |
rapidly.</p> | |
<p>In line with OpenSSL's recommendation to use a more modern algorithm instead of | |
<a href="https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html"><code>EVP_BytesToKey</code></a> it is recommended that developers derive a key and IV on | |
-their own using <a href="crypto.html#crypto_crypto_scrypt_password_salt_keylen_options_callback"><code>crypto.scrypt()</code></a> and to use <a href="crypto.html#crypto_crypto_createdecipheriv_algorithm_key_iv_options"><code>crypto.createDecipheriv()</code></a> | |
+their own using <a href="#crypto_crypto_scrypt_password_salt_keylen_options_callback"><code>crypto.scrypt()</code></a> and to use <a href="#crypto_crypto_createdecipheriv_algorithm_key_iv_options"><code>crypto.createDecipheriv()</code></a> | |
to create the <code>Decipher</code> object.</p> | |
<h3>crypto.createDecipheriv(algorithm, key, iv[, options])<span><a class="mark" href="#crypto_crypto_createdecipheriv_algorithm_key_iv_options" id="crypto_crypto_createdecipheriv_algorithm_key_iv_options">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -15995,10 +15971,10 @@ | |
</details> | |
</div><ul> | |
<li><code>algorithm</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li><code>key</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li><code>iv</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="stream.html#stream_new_stream_transform_options"><code>stream.transform</code> options</a></li> | |
-<li>Returns: <a href="crypto.html#crypto_class_decipher" class="type"><Decipher></a></li> | |
+<li><code>key</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>iv</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="#stream_new_stream_transform_options"><code>stream.transform</code> options</a></li> | |
+<li>Returns: <a href="#crypto_class_decipher" class="type"><Decipher></a></li> | |
</ul> | |
<p>Creates and returns a <code>Decipher</code> object that uses the given <code>algorithm</code>, <code>key</code> | |
and initialization vector (<code>iv</code>).</p> | |
@@ -16014,7 +15990,7 @@ | |
display the available cipher algorithms.</p> | |
<p>The <code>key</code> is the raw key used by the <code>algorithm</code> and <code>iv</code> is an | |
<a href="https://en.wikipedia.org/wiki/Initialization_vector">initialization vector</a>. Both arguments must be <code>'utf8'</code> encoded strings, | |
-<a href="buffer.html#buffer_class_buffer">Buffers</a>, <code>TypedArray</code>, or <code>DataView</code>s. If the cipher does not need | |
+<a href="buffer.html">Buffers</a>, <code>TypedArray</code>, or <code>DataView</code>s. If the cipher does not need | |
an initialization vector, <code>iv</code> may be <code>null</code>.</p> | |
<p>Initialization vectors should be unpredictable and unique; ideally, they will be | |
cryptographically random. They do not have to be secret: IVs are typically just | |
@@ -16042,28 +16018,28 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>prime</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>prime</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>primeEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li><code>generator</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a> <strong>Default:</strong> | |
+<li><code>generator</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a> <strong>Default:</strong> | |
<code>2</code></li> | |
<li><code>generatorEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Creates a <code>DiffieHellman</code> key exchange object using the supplied <code>prime</code> and an | |
optional specific <code>generator</code>.</p> | |
-<p>The <code>generator</code> argument can be a number, string, or <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>. If | |
+<p>The <code>generator</code> argument can be a number, string, or <a href="buffer.html"><code>Buffer</code></a>. If | |
<code>generator</code> is not specified, the value <code>2</code> is used.</p> | |
<p>The <code>primeEncoding</code> and <code>generatorEncoding</code> arguments can be <code>'latin1'</code>, | |
<code>'hex'</code>, or <code>'base64'</code>.</p> | |
<p>If <code>primeEncoding</code> is specified, <code>prime</code> is expected to be a string; otherwise | |
-a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, <code>TypedArray</code>, or <code>DataView</code> is expected.</p> | |
+a <a href="buffer.html"><code>Buffer</code></a>, <code>TypedArray</code>, or <code>DataView</code> is expected.</p> | |
<p>If <code>generatorEncoding</code> is specified, <code>generator</code> is expected to be a string; | |
-otherwise a number, <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, <code>TypedArray</code>, or <code>DataView</code> is expected.</p> | |
+otherwise a number, <a href="buffer.html"><code>Buffer</code></a>, <code>TypedArray</code>, or <code>DataView</code> is expected.</p> | |
<h3>crypto.createDiffieHellman(primeLength[, generator])<span><a class="mark" href="#crypto_crypto_creatediffiehellman_primelength_generator" id="crypto_crypto_creatediffiehellman_primelength_generator">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.5.0</span> | |
</div><ul> | |
<li><code>primeLength</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
-<li><code>generator</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a> <strong>Default:</strong> | |
+<li><code>generator</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a> <strong>Default:</strong> | |
<code>2</code></li> | |
</ul> | |
<p>Creates a <code>DiffieHellman</code> key exchange object and generates a prime of | |
@@ -16077,7 +16053,7 @@ | |
</ul> | |
<p>Creates an Elliptic Curve Diffie-Hellman (<code>ECDH</code>) key exchange object using a | |
predefined curve specified by the <code>curveName</code> string. Use | |
-<a href="crypto.html#crypto_crypto_getcurves"><code>crypto.getCurves()</code></a> to obtain a list of available curve names. On recent | |
+<a href="#crypto_crypto_getcurves"><code>crypto.getCurves()</code></a> to obtain a list of available curve names. On recent | |
OpenSSL releases, <code>openssl ecparam -list_curves</code> will also display the name | |
and description of each available elliptic curve.</p> | |
<h3>crypto.createHash(algorithm[, options])<span><a class="mark" href="#crypto_crypto_createhash_algorithm_options" id="crypto_crypto_createhash_algorithm_options">#</a></span></h3> | |
@@ -16085,8 +16061,8 @@ | |
<span>Added in: v0.1.92</span> | |
</div><ul> | |
<li><code>algorithm</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="stream.html#stream_new_stream_transform_options"><code>stream.transform</code> options</a></li> | |
-<li>Returns: <a href="crypto.html#crypto_class_hash" class="type"><Hash></a></li> | |
+<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="#stream_new_stream_transform_options"><code>stream.transform</code> options</a></li> | |
+<li>Returns: <a href="#crypto_class_hash" class="type"><Hash></a></li> | |
</ul> | |
<p>Creates and returns a <code>Hash</code> object that can be used to generate hash digests | |
using the given <code>algorithm</code>. Optional <code>options</code> argument controls stream | |
@@ -16118,9 +16094,9 @@ | |
<span>Added in: v0.1.94</span> | |
</div><ul> | |
<li><code>algorithm</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li><code>key</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="stream.html#stream_new_stream_transform_options"><code>stream.transform</code> options</a></li> | |
-<li>Returns: <a href="crypto.html#crypto_class_hmac" class="type"><Hmac></a></li> | |
+<li><code>key</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="#stream_new_stream_transform_options"><code>stream.transform</code> options</a></li> | |
+<li>Returns: <a href="#crypto_class_hmac" class="type"><Hmac></a></li> | |
</ul> | |
<p>Creates and returns an <code>Hmac</code> object that uses the given <code>algorithm</code> and <code>key</code>. | |
Optional <code>options</code> argument controls stream behavior.</p> | |
@@ -16152,8 +16128,8 @@ | |
<span>Added in: v0.1.92</span> | |
</div><ul> | |
<li><code>algorithm</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="stream.html#stream_constructor_new_stream_writable_options"><code>stream.Writable</code> options</a></li> | |
-<li>Returns: <a href="crypto.html#crypto_class_sign" class="type"><Sign></a></li> | |
+<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="#stream_constructor_new_stream_writable_options"><code>stream.Writable</code> options</a></li> | |
+<li>Returns: <a href="#crypto_class_sign" class="type"><Sign></a></li> | |
</ul> | |
<p>Creates and returns a <code>Sign</code> object that uses the given <code>algorithm</code>. | |
Use <a href="#crypto_crypto_gethashes"><code>crypto.getHashes()</code></a> to obtain an array of names of the available | |
@@ -16164,8 +16140,8 @@ | |
<span>Added in: v0.1.92</span> | |
</div><ul> | |
<li><code>algorithm</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="stream.html#stream_constructor_new_stream_writable_options"><code>stream.Writable</code> options</a></li> | |
-<li>Returns: <a href="crypto.html#crypto_class_verify" class="type"><Verify></a></li> | |
+<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> <a href="#stream_constructor_new_stream_writable_options"><code>stream.Writable</code> options</a></li> | |
+<li>Returns: <a href="#crypto_class_verify" class="type"><Verify></a></li> | |
</ul> | |
<p>Creates and returns a <code>Verify</code> object that uses the given algorithm. | |
Use <a href="#crypto_crypto_gethashes"><code>crypto.getHashes()</code></a> to obtain an array of names of the available | |
@@ -16201,7 +16177,7 @@ | |
</ul> | |
<p>Creates a predefined <code>DiffieHellman</code> key exchange object. The | |
supported groups are: <code>'modp1'</code>, <code>'modp2'</code>, <code>'modp5'</code> (defined in | |
-<a href="https://www.rfc-editor.org/rfc/rfc2412.txt">RFC 2412</a>, but see <a href="#fs_caveats">Caveats</a>) and <code>'modp14'</code>, <code>'modp15'</code>, | |
+<a href="https://www.rfc-editor.org/rfc/rfc2412.txt">RFC 2412</a>, but see <a href="#crypto_support_for_weak_or_compromised_algorithms">Caveats</a>) and <code>'modp14'</code>, <code>'modp15'</code>, | |
<code>'modp16'</code>, <code>'modp17'</code>, <code>'modp18'</code> (defined in <a href="https://www.rfc-editor.org/rfc/rfc3526.txt">RFC 3526</a>). The | |
returned object mimics the interface of objects created by | |
<a href="#crypto_crypto_creatediffiehellman_prime_primeencoding_generator_generatorencoding"><code>crypto.createDiffieHellman()</code></a>, but will not allow changing | |
@@ -16261,14 +16237,14 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>password</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li><code>salt</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>password</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>salt</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>iterations</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
<li><code>keylen</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
<li><code>digest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
-<li><code>derivedKey</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>derivedKey</code> <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
</li> | |
</ul> | |
@@ -16279,7 +16255,7 @@ | |
<p>The supplied <code>callback</code> function is called with two arguments: <code>err</code> and | |
<code>derivedKey</code>. If an error occurs while deriving the key, <code>err</code> will be set; | |
otherwise <code>err</code> will be <code>null</code>. By default, the successfully generated | |
-<code>derivedKey</code> will be passed to the callback as a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>. An error will be | |
+<code>derivedKey</code> will be passed to the callback as a <a href="buffer.html"><code>Buffer</code></a>. An error will be | |
thrown if any of the input arguments specify invalid values or types.</p> | |
<p>The <code>iterations</code> argument must be a number set as high as possible. The | |
higher the number of iterations, the more secure the derived key will be, | |
@@ -16307,7 +16283,7 @@ | |
<a href="#crypto_crypto_gethashes"><code>crypto.getHashes()</code></a>.</p> | |
<p>Note that this API uses libuv's threadpool, which can have surprising and | |
negative performance implications for some applications, see the | |
-<a href="cli.html#cli_uv_threadpool_size_size"><code>UV_THREADPOOL_SIZE</code></a> documentation for more information.</p> | |
+<a href="#cli_uv_threadpool_size_size"><code>UV_THREADPOOL_SIZE</code></a> documentation for more information.</p> | |
<h3>crypto.pbkdf2Sync(password, salt, iterations, keylen, digest)<span><a class="mark" href="#crypto_crypto_pbkdf2sync_password_salt_iterations_keylen_digest" id="crypto_crypto_pbkdf2sync_password_salt_iterations_keylen_digest">#</a></span></h3> | |
<div class="api_metadata"> | |
<details class="changelog"><summary>History</summary> | |
@@ -16325,19 +16301,19 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>password</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li><code>salt</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>password</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>salt</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>iterations</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
<li><code>keylen</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
<li><code>digest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
<p>Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2) | |
implementation. A selected HMAC digest algorithm specified by <code>digest</code> is | |
applied to derive a key of the requested byte length (<code>keylen</code>) from the | |
<code>password</code>, <code>salt</code> and <code>iterations</code>.</p> | |
<p>If an error occurs an <code>Error</code> will be thrown, otherwise the derived key will be | |
-returned as a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>.</p> | |
+returned as a <a href="buffer.html"><code>Buffer</code></a>.</p> | |
<p>The <code>iterations</code> argument must be a number set as high as possible. The | |
higher the number of iterations, the more secure the derived key will be, | |
but will take a longer amount of time to complete.</p> | |
@@ -16365,14 +16341,14 @@ | |
<li><code>privateKey</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a><ul> | |
<li><code>key</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> A PEM encoded private key.</li> | |
<li><code>passphrase</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> An optional passphrase for the private key.</li> | |
-<li><code>padding</code> <a href="crypto.html#crypto_crypto_constants_1" class="type"><crypto.constants></a> An optional padding value defined in | |
+<li><code>padding</code> <a href="#crypto_crypto_constants_1" class="type"><crypto.constants></a> An optional padding value defined in | |
<code>crypto.constants</code>, which may be: <code>crypto.constants.RSA_NO_PADDING</code>, | |
<code>crypto.constants.RSA_PKCS1_PADDING</code>, or | |
<code>crypto.constants.RSA_PKCS1_OAEP_PADDING</code>.</li> | |
</ul> | |
</li> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> A new <code>Buffer</code> with the decrypted content.</li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> A new <code>Buffer</code> with the decrypted content.</li> | |
</ul> | |
<p>Decrypts <code>buffer</code> with <code>privateKey</code>.</p> | |
<p><code>privateKey</code> can be an object or a string. If <code>privateKey</code> is a string, it is | |
@@ -16384,13 +16360,13 @@ | |
<li><code>privateKey</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a><ul> | |
<li><code>key</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> A PEM encoded private key.</li> | |
<li><code>passphrase</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> An optional passphrase for the private key.</li> | |
-<li><code>padding</code> <a href="crypto.html#crypto_crypto_constants_1" class="type"><crypto.constants></a> An optional padding value defined in | |
+<li><code>padding</code> <a href="#crypto_crypto_constants_1" class="type"><crypto.constants></a> An optional padding value defined in | |
<code>crypto.constants</code>, which may be: <code>crypto.constants.RSA_NO_PADDING</code> or | |
<code>crypto.constants.RSA_PKCS1_PADDING</code>.</li> | |
</ul> | |
</li> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> A new <code>Buffer</code> with the encrypted content.</li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> A new <code>Buffer</code> with the encrypted content.</li> | |
</ul> | |
<p>Encrypts <code>buffer</code> with <code>privateKey</code>.</p> | |
<p><code>privateKey</code> can be an object or a string. If <code>privateKey</code> is a string, it is | |
@@ -16402,13 +16378,13 @@ | |
<li><code>key</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a><ul> | |
<li><code>key</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> A PEM encoded public or private key.</li> | |
<li><code>passphrase</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> An optional passphrase for the private key.</li> | |
-<li><code>padding</code> <a href="crypto.html#crypto_crypto_constants_1" class="type"><crypto.constants></a> An optional padding value defined in | |
+<li><code>padding</code> <a href="#crypto_crypto_constants_1" class="type"><crypto.constants></a> An optional padding value defined in | |
<code>crypto.constants</code>, which may be: <code>crypto.constants.RSA_NO_PADDING</code> or | |
<code>crypto.constants.RSA_PKCS1_PADDING</code>.</li> | |
</ul> | |
</li> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> A new <code>Buffer</code> with the decrypted content.</li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> A new <code>Buffer</code> with the decrypted content.</li> | |
</ul> | |
<p>Decrypts <code>buffer</code> with <code>key</code>.</p> | |
<p><code>key</code> can be an object or a string. If <code>key</code> is a string, it is treated as | |
@@ -16422,17 +16398,17 @@ | |
<li><code>key</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a><ul> | |
<li><code>key</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> A PEM encoded public or private key.</li> | |
<li><code>passphrase</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> An optional passphrase for the private key.</li> | |
-<li><code>padding</code> <a href="crypto.html#crypto_crypto_constants_1" class="type"><crypto.constants></a> An optional padding value defined in | |
+<li><code>padding</code> <a href="#crypto_crypto_constants_1" class="type"><crypto.constants></a> An optional padding value defined in | |
<code>crypto.constants</code>, which may be: <code>crypto.constants.RSA_NO_PADDING</code>, | |
<code>crypto.constants.RSA_PKCS1_PADDING</code>, or | |
<code>crypto.constants.RSA_PKCS1_OAEP_PADDING</code>.</li> | |
</ul> | |
</li> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> A new <code>Buffer</code> with the encrypted content.</li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> A new <code>Buffer</code> with the encrypted content.</li> | |
</ul> | |
<p>Encrypts the content of <code>buffer</code> with <code>key</code> and returns a new | |
-<a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> with encrypted content.</p> | |
+<a href="buffer.html"><code>Buffer</code></a> with encrypted content.</p> | |
<p><code>key</code> can be an object or a string. If <code>key</code> is a string, it is treated as | |
the key with no passphrase and will use <code>RSA_PKCS1_OAEP_PADDING</code>.</p> | |
<p>Because RSA public keys can be derived from private keys, a private key may | |
@@ -16454,17 +16430,17 @@ | |
<li><code>size</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
-<li><code>buf</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>buf</code> <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> if the <code>callback</code> function is not provided.</li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> if the <code>callback</code> function is not provided.</li> | |
</ul> | |
<p>Generates cryptographically strong pseudo-random data. The <code>size</code> argument | |
is a number indicating the number of bytes to generate.</p> | |
<p>If a <code>callback</code> function is provided, the bytes are generated asynchronously | |
and the <code>callback</code> function is invoked with two arguments: <code>err</code> and <code>buf</code>. | |
If an error occurs, <code>err</code> will be an <code>Error</code> object; otherwise it is <code>null</code>. The | |
-<code>buf</code> argument is a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> containing the generated bytes.</p> | |
+<code>buf</code> argument is a <a href="buffer.html"><code>Buffer</code></a> containing the generated bytes.</p> | |
<pre><code class="lang-js">// Asynchronous | |
const crypto = require('crypto'); | |
crypto.randomBytes(256, (err, buf) => { | |
@@ -16473,7 +16449,7 @@ | |
}); | |
</code></pre> | |
<p>If the <code>callback</code> function is not provided, the random bytes are generated | |
-synchronously and returned as a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>. An error will be thrown if | |
+synchronously and returned as a <a href="buffer.html"><code>Buffer</code></a>. An error will be thrown if | |
there is a problem generating the bytes.</p> | |
<pre><code class="lang-js">// Synchronous | |
const buf = crypto.randomBytes(256); | |
@@ -16487,7 +16463,7 @@ | |
time is right after boot, when the whole system is still low on entropy.</p> | |
<p>Note that this API uses libuv's threadpool, which can have surprising and | |
negative performance implications for some applications, see the | |
-<a href="cli.html#cli_uv_threadpool_size_size"><code>UV_THREADPOOL_SIZE</code></a> documentation for more information.</p> | |
+<a href="#cli_uv_threadpool_size_size"><code>UV_THREADPOOL_SIZE</code></a> documentation for more information.</p> | |
<p>The asynchronous version of <code>crypto.randomBytes()</code> is carried out in a single | |
threadpool request. To minimize threadpool task length variation, partition | |
large <code>randomBytes</code> requests when doing so as part of fulfilling a client | |
@@ -16506,10 +16482,10 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a> Must be supplied.</li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a> Must be supplied.</li> | |
<li><code>offset</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> <strong>Default:</strong> <code>0</code></li> | |
<li><code>size</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> <strong>Default:</strong> <code>buffer.length - offset</code></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
<p>Synchronous version of <a href="#crypto_crypto_randomfill_buffer_offset_size_callback"><code>crypto.randomFill()</code></a>.</p> | |
<pre><code class="lang-js">const buf = Buffer.alloc(10); | |
@@ -16546,13 +16522,13 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a> Must be supplied.</li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a> Must be supplied.</li> | |
<li><code>offset</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> <strong>Default:</strong> <code>0</code></li> | |
<li><code>size</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> <strong>Default:</strong> <code>buffer.length - offset</code></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> <code>function(err, buf) {}</code>.</li> | |
</ul> | |
<p>This function is similar to <a href="#crypto_crypto_randombytes_size_callback"><code>crypto.randomBytes()</code></a> but requires the first | |
-argument to be a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> that will be filled. It also | |
+argument to be a <a href="buffer.html"><code>Buffer</code></a> that will be filled. It also | |
requires that a callback is passed in.</p> | |
<p>If the <code>callback</code> function is not provided, an error will be thrown.</p> | |
<pre><code class="lang-js">const buf = Buffer.alloc(10); | |
@@ -16593,7 +16569,7 @@ | |
</code></pre> | |
<p>Note that this API uses libuv's threadpool, which can have surprising and | |
negative performance implications for some applications, see the | |
-<a href="cli.html#cli_uv_threadpool_size_size"><code>UV_THREADPOOL_SIZE</code></a> documentation for more information.</p> | |
+<a href="#cli_uv_threadpool_size_size"><code>UV_THREADPOOL_SIZE</code></a> documentation for more information.</p> | |
<p>The asynchronous version of <code>crypto.randomFill()</code> is carried out in a single | |
threadpool request. To minimize threadpool task length variation, partition | |
large <code>randomFill</code> requests when doing so as part of fulfilling a client | |
@@ -16602,8 +16578,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.5.0</span> | |
</div><ul> | |
-<li><code>password</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li><code>salt</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>password</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>salt</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>keylen</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>N</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> CPU/memory cost parameter. Must be a power of two greater | |
@@ -16616,7 +16592,7 @@ | |
</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
-<li><code>derivedKey</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>derivedKey</code> <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
</li> | |
</ul> | |
@@ -16627,7 +16603,7 @@ | |
random and at least 16 bytes long. See <a href="http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf">NIST SP 800-132</a> for details.</p> | |
<p>The <code>callback</code> function is called with two arguments: <code>err</code> and <code>derivedKey</code>. | |
<code>err</code> is an exception object when key derivation fails, otherwise <code>err</code> is | |
-<code>null</code>. <code>derivedKey</code> is passed to the callback as a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>.</p> | |
+<code>null</code>. <code>derivedKey</code> is passed to the callback as a <a href="buffer.html"><code>Buffer</code></a>.</p> | |
<p>An exception is thrown when any of the input arguments specify invalid values | |
or types.</p> | |
<pre><code class="lang-js">const crypto = require('crypto'); | |
@@ -16646,8 +16622,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.5.0</span> | |
</div><ul> | |
-<li><code>password</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li><code>salt</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>password</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>salt</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li><code>keylen</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>N</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> CPU/memory cost parameter. Must be a power of two greater | |
@@ -16658,7 +16634,7 @@ | |
<code>128 * N * r > maxmem</code>. <strong>Default:</strong> <code>32 * 1024 * 1024</code>.</li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
<p>Provides a synchronous <a href="https://en.wikipedia.org/wiki/Scrypt">scrypt</a> implementation. Scrypt is a password-based | |
key derivation function that is designed to be expensive computationally and | |
@@ -16666,7 +16642,7 @@ | |
<p>The <code>salt</code> should be as unique as possible. It is recommended that a salt is | |
random and at least 16 bytes long. See <a href="http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf">NIST SP 800-132</a> for details.</p> | |
<p>An exception is thrown when key derivation fails, otherwise the derived key is | |
-returned as a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>.</p> | |
+returned as a <a href="buffer.html"><code>Buffer</code></a>.</p> | |
<p>An exception is thrown when any of the input arguments specify invalid values | |
or types.</p> | |
<pre><code class="lang-js">const crypto = require('crypto'); | |
@@ -16682,7 +16658,7 @@ | |
<span>Added in: v0.11.11</span> | |
</div><ul> | |
<li><code>engine</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li><code>flags</code> <a href="crypto.html#crypto_crypto_constants_1" class="type"><crypto.constants></a> <strong>Default:</strong> <code>crypto.constants.ENGINE_METHOD_ALL</code></li> | |
+<li><code>flags</code> <a href="#crypto_crypto_constants_1" class="type"><crypto.constants></a> <strong>Default:</strong> <code>crypto.constants.ENGINE_METHOD_ALL</code></li> | |
</ul> | |
<p>Load and set the <code>engine</code> for some or all OpenSSL functions (selected by flags).</p> | |
<p><code>engine</code> could be either an id or a path to the engine's shared library.</p> | |
@@ -16720,8 +16696,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v6.6.0</span> | |
</div><ul> | |
-<li><code>a</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
-<li><code>b</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>a</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
+<li><code>b</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
</ul> | |
<p>This function is based on a constant-time algorithm. | |
@@ -16737,12 +16713,12 @@ | |
<h2>Notes<span><a class="mark" href="#crypto_notes" id="crypto_notes">#</a></span></h2> | |
<h3>Legacy Streams API (pre Node.js v0.10)<span><a class="mark" href="#crypto_legacy_streams_api_pre_node_js_v0_10" id="crypto_legacy_streams_api_pre_node_js_v0_10">#</a></span></h3> | |
<p>The Crypto module was added to Node.js before there was the concept of a | |
-unified Stream API, and before there were <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> objects for handling | |
+unified Stream API, and before there were <a href="buffer.html"><code>Buffer</code></a> objects for handling | |
binary data. As such, the many of the <code>crypto</code> defined classes have methods not | |
-typically found on other Node.js classes that implement the <a href="stream.html#stream_stream">streams</a> | |
+typically found on other Node.js classes that implement the <a href="stream.html">streams</a> | |
API (e.g. <code>update()</code>, <code>final()</code>, or <code>digest()</code>). Also, many methods accepted | |
and returned <code>'latin1'</code> encoded strings by default rather than <code>Buffer</code>s. This | |
-default was changed after Node.js v0.8 to use <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> objects by default | |
+default was changed after Node.js v0.8 to use <a href="buffer.html"><code>Buffer</code></a> objects by default | |
instead.</p> | |
<h3>Recent ECDH Changes<span><a class="mark" href="#crypto_recent_ecdh_changes" id="crypto_recent_ecdh_changes">#</a></span></h3> | |
<p>Usage of <code>ECDH</code> with non-dynamically generated key pairs has been simplified. | |
@@ -16751,10 +16727,10 @@ | |
This allows code to only store and provide the private part of the EC key pair. | |
<a href="#crypto_ecdh_setprivatekey_privatekey_encoding"><code>ecdh.setPrivateKey()</code></a> now also validates that the private key is valid for | |
the selected curve.</p> | |
-<p>The <a href="crypto.html#crypto_ecdh_setpublickey_publickey_encoding"><code>ecdh.setPublicKey()</code></a> method is now deprecated as its inclusion in the | |
+<p>The <a href="#crypto_ecdh_setpublickey_publickey_encoding"><code>ecdh.setPublicKey()</code></a> method is now deprecated as its inclusion in the | |
API is not useful. Either a previously stored private key should be set, which | |
automatically generates the associated public key, or <a href="#crypto_ecdh_generatekeys_encoding_format"><code>ecdh.generateKeys()</code></a> | |
-should be called. The main drawback of using <a href="crypto.html#crypto_ecdh_setpublickey_publickey_encoding"><code>ecdh.setPublicKey()</code></a> is that | |
+should be called. The main drawback of using <a href="#crypto_ecdh_setpublickey_publickey_encoding"><code>ecdh.setPublicKey()</code></a> is that | |
it can be used to put the ECDH key pair into an inconsistent state.</p> | |
<h3>Support for weak or compromised algorithms<span><a class="mark" href="#crypto_support_for_weak_or_compromised_algorithms" id="crypto_support_for_weak_or_compromised_algorithms">#</a></span></h3> | |
<p>The <code>crypto</code> module still supports some algorithms which are already | |
@@ -17141,12 +17117,9 @@ | |
process.</td> | |
</tr> | |
</table> | |
- | |
-<!-- [end-include:crypto.md] --> | |
-<!-- [start-include:debugger.md] --> | |
<h1>Debugger<span><a class="mark" href="#debugger_debugger" id="debugger_debugger">#</a></span></h1> | |
<!--introduced_in=v0.9.12--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><!-- type=misc --> | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><!-- type=misc --> | |
<p>Node.js includes an out-of-process debugging utility accessible via a | |
<a href="#debugger_v8_inspector_integration_for_node_js">V8 Inspector</a> and built-in debugging client. To use it, start Node.js | |
with the <code>inspect</code> argument followed by the path to the script to debug; a | |
@@ -17310,8 +17283,6 @@ | |
debugging sessions.)</p> | |
<p>If the Chrome browser is older than 66.0.3345.0, | |
use <code>inspector.html</code> instead of <code>js_app.html</code> in the above URL.</p> | |
-<!-- [end-include:debugger.md] --> | |
-<!-- [start-include:deprecations.md] --> | |
<h1>Deprecated APIs<span><a class="mark" href="#deprecations_deprecated_apis" id="deprecations_deprecated_apis">#</a></span></h1> | |
<!--introduced_in=v7.7.0--> | |
<!-- type=misc --> | |
@@ -17327,7 +17298,7 @@ | |
<p>A Documentation-only deprecation is one that is expressed only within the | |
Node.js API docs. These generate no side-effects while running Node.js. | |
Some Documentation-only deprecations trigger a runtime warning when launched | |
-with <a href="cli.html#cli_pending_deprecation"><code>--pending-deprecation</code></a> flag (or its alternative, | |
+with <a href="#cli_pending_deprecation"><code>--pending-deprecation</code></a> flag (or its alternative, | |
<code>NODE_PENDING_DEPRECATION=1</code> environment variable), similarly to Runtime | |
deprecations below. Documentation-only deprecations that support that flag | |
are explicitly labeled as such in the | |
@@ -17364,23 +17335,23 @@ | |
be used.</p> | |
<p><a id="DEP0005"></a></p> | |
<h3>DEP0005: Buffer() constructor<span><a class="mark" href="#deprecations_dep0005_buffer_constructor" id="deprecations_dep0005_buffer_constructor">#</a></span></h3> | |
-<p>Type: Runtime (supports <a href="cli.html#cli_pending_deprecation"><code>--pending-deprecation</code></a>)</p> | |
+<p>Type: Runtime (supports <a href="#cli_pending_deprecation"><code>--pending-deprecation</code></a>)</p> | |
<p>The <code>Buffer()</code> function and <code>new Buffer()</code> constructor are deprecated due to | |
API usability issues that can potentially lead to accidental security issues.</p> | |
<p>As an alternative, use of the following methods of constructing <code>Buffer</code> objects | |
is strongly recommended:</p> | |
<ul> | |
-<li><a href="buffer.html#buffer_class_method_buffer_alloc_size_fill_encoding"><code>Buffer.alloc(size[, fill[, encoding]])</code></a> - Create a <code>Buffer</code> with | |
+<li><a href="#buffer_class_method_buffer_alloc_size_fill_encoding"><code>Buffer.alloc(size[, fill[, encoding]])</code></a> - Create a <code>Buffer</code> with | |
<em>initialized</em> memory.</li> | |
-<li><a href="buffer.html#buffer_class_method_buffer_allocunsafe_size"><code>Buffer.allocUnsafe(size)</code></a> - Create a <code>Buffer</code> with | |
+<li><a href="#buffer_class_method_buffer_allocunsafe_size"><code>Buffer.allocUnsafe(size)</code></a> - Create a <code>Buffer</code> with | |
<em>uninitialized</em> memory.</li> | |
-<li><a href="buffer.html#buffer_class_method_buffer_allocunsafeslow_size"><code>Buffer.allocUnsafeSlow(size)</code></a> - Create a <code>Buffer</code> with <em>uninitialized</em> | |
+<li><a href="#buffer_class_method_buffer_allocunsafeslow_size"><code>Buffer.allocUnsafeSlow(size)</code></a> - Create a <code>Buffer</code> with <em>uninitialized</em> | |
memory.</li> | |
-<li><a href="buffer.html#buffer_class_method_buffer_from_array"><code>Buffer.from(array)</code></a> - Create a <code>Buffer</code> with a copy of <code>array</code></li> | |
-<li><a href="buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length"><code>Buffer.from(arrayBuffer[, byteOffset[, length]])</code></a> - | |
+<li><a href="#buffer_class_method_buffer_from_array"><code>Buffer.from(array)</code></a> - Create a <code>Buffer</code> with a copy of <code>array</code></li> | |
+<li><a href="#buffer_class_method_buffer_from_arraybuffer_byteoffset_length"><code>Buffer.from(arrayBuffer[, byteOffset[, length]])</code></a> - | |
Create a <code>Buffer</code> that wraps the given <code>arrayBuffer</code>.</li> | |
-<li><a href="buffer.html#buffer_class_method_buffer_from_buffer"><code>Buffer.from(buffer)</code></a> - Create a <code>Buffer</code> that copies <code>buffer</code>.</li> | |
-<li><a href="buffer.html#buffer_class_method_buffer_from_string_encoding"><code>Buffer.from(string[, encoding])</code></a> - Create a <code>Buffer</code> | |
+<li><a href="#buffer_class_method_buffer_from_buffer"><code>Buffer.from(buffer)</code></a> - Create a <code>Buffer</code> that copies <code>buffer</code>.</li> | |
+<li><a href="#buffer_class_method_buffer_from_string_encoding"><code>Buffer.from(string[, encoding])</code></a> - Create a <code>Buffer</code> | |
that copies <code>string</code>.</li> | |
</ul> | |
<p>As of v10.0.0, a deprecation warning is printed at runtime when | |
@@ -17399,7 +17370,7 @@ | |
<code>suicide</code> was added to the <code>Worker</code> object. The intent of this property was to | |
provide an indication of how and why the <code>Worker</code> instance exited. In Node.js | |
6.0.0, the old property was deprecated and replaced with a new | |
-<a href="cluster.html#cluster_worker_exitedafterdisconnect"><code>worker.exitedAfterDisconnect</code></a> property. The old property name did not | |
+<a href="#cluster_worker_exitedafterdisconnect"><code>worker.exitedAfterDisconnect</code></a> property. The old property name did not | |
precisely describe the actual semantics and was unnecessarily emotion-laden.</p> | |
<p><a id="DEP0008"></a></p> | |
<h3>DEP0008: require('constants')<span><a class="mark" href="#deprecations_dep0008_require_constants" id="deprecations_dep0008_require_constants">#</a></span></h3> | |
@@ -17411,7 +17382,7 @@ | |
<p><a id="DEP0009"></a></p> | |
<h3>DEP0009: crypto.pbkdf2 without digest<span><a class="mark" href="#deprecations_dep0009_crypto_pbkdf2_without_digest" id="deprecations_dep0009_crypto_pbkdf2_without_digest">#</a></span></h3> | |
<p>Type: End-of-Life</p> | |
-<p>Use of the <a href="crypto.html#crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback"><code>crypto.pbkdf2()</code></a> API without specifying a digest was deprecated | |
+<p>Use of the <a href="#crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback"><code>crypto.pbkdf2()</code></a> API without specifying a digest was deprecated | |
in Node.js 6.0 because the method defaulted to using the non-recommended | |
<code>'SHA1'</code> digest. Previously, a deprecation warning was printed. Starting in | |
Node.js 8.0.0, calling <code>crypto.pbkdf2()</code> or <code>crypto.pbkdf2Sync()</code> with an | |
@@ -17419,12 +17390,12 @@ | |
<p><a id="DEP0010"></a></p> | |
<h3>DEP0010: crypto.createCredentials<span><a class="mark" href="#deprecations_dep0010_crypto_createcredentials" id="deprecations_dep0010_crypto_createcredentials">#</a></span></h3> | |
<p>Type: Runtime</p> | |
-<p>The <a href="crypto.html#crypto_crypto_createcredentials_details"><code>crypto.createCredentials()</code></a> API is deprecated. Please use | |
+<p>The <a href="#crypto_crypto_createcredentials_details"><code>crypto.createCredentials()</code></a> API is deprecated. Please use | |
<a href="#tls_tls_createsecurecontext_options"><code>tls.createSecureContext()</code></a> instead.</p> | |
<p><a id="DEP0011"></a></p> | |
<h3>DEP0011: crypto.Credentials<span><a class="mark" href="#deprecations_dep0011_crypto_credentials" id="deprecations_dep0011_crypto_credentials">#</a></span></h3> | |
<p>Type: Runtime</p> | |
-<p>The <code>crypto.Credentials</code> class is deprecated. Please use <a href="tls.html#tls_tls_createsecurecontext_options"><code>tls.SecureContext</code></a> | |
+<p>The <code>crypto.Credentials</code> class is deprecated. Please use <a href="#tls_tls_createsecurecontext_options"><code>tls.SecureContext</code></a> | |
instead.</p> | |
<p><a id="DEP0012"></a></p> | |
<h3>DEP0012: Domain.dispose<span><a class="mark" href="#deprecations_dep0012_domain_dispose" id="deprecations_dep0012_domain_dispose">#</a></span></h3> | |
@@ -17444,7 +17415,7 @@ | |
<p><a id="DEP0015"></a></p> | |
<h3>DEP0015: fs.readSync legacy String interface<span><a class="mark" href="#deprecations_dep0015_fs_readsync_legacy_string_interface" id="deprecations_dep0015_fs_readsync_legacy_string_interface">#</a></span></h3> | |
<p>Type: End-of-Life</p> | |
-<p>The <a href="fs.html#fs_fs_readsync_fd_buffer_offset_length_position"><code>fs.readSync()</code></a> legacy <code>String</code> interface is deprecated. Use the | |
+<p>The <a href="#fs_fs_readsync_fd_buffer_offset_length_position"><code>fs.readSync()</code></a> legacy <code>String</code> interface is deprecated. Use the | |
<code>Buffer</code> API as mentioned in the documentation instead.</p> | |
<p><a id="DEP0016"></a></p> | |
<h3>DEP0016: GLOBAL/root<span><a class="mark" href="#deprecations_dep0016_global_root" id="deprecations_dep0016_global_root">#</a></span></h3> | |
@@ -17471,22 +17442,22 @@ | |
<p><a id="DEP0020"></a></p> | |
<h3>DEP0020: Server.connections<span><a class="mark" href="#deprecations_dep0020_server_connections" id="deprecations_dep0020_server_connections">#</a></span></h3> | |
<p>Type: Runtime</p> | |
-<p>The <a href="net.html#net_server_connections"><code>Server.connections</code></a> property is deprecated. Please use the | |
-<a href="net.html#net_server_getconnections_callback"><code>Server.getConnections()</code></a> method instead.</p> | |
+<p>The <a href="#net_server_connections"><code>Server.connections</code></a> property is deprecated. Please use the | |
+<a href="#net_server_getconnections_callback"><code>Server.getConnections()</code></a> method instead.</p> | |
<p><a id="DEP0021"></a></p> | |
<h3>DEP0021: Server.listenFD<span><a class="mark" href="#deprecations_dep0021_server_listenfd" id="deprecations_dep0021_server_listenfd">#</a></span></h3> | |
<p>Type: Runtime</p> | |
<p>The <code>Server.listenFD()</code> method is deprecated. Please use | |
-<a href="net.html#net_server_listen_handle_backlog_callback"><code>Server.listen({fd: <number>})</code></a> instead.</p> | |
+<a href="#net_server_listen_handle_backlog_callback"><code>Server.listen({fd: <number>})</code></a> instead.</p> | |
<p><a id="DEP0022"></a></p> | |
<h3>DEP0022: os.tmpDir()<span><a class="mark" href="#deprecations_dep0022_os_tmpdir" id="deprecations_dep0022_os_tmpdir">#</a></span></h3> | |
<p>Type: Runtime</p> | |
-<p>The <code>os.tmpDir()</code> API is deprecated. Please use <a href="os.html#os_os_tmpdir"><code>os.tmpdir()</code></a> instead.</p> | |
+<p>The <code>os.tmpDir()</code> API is deprecated. Please use <a href="#os_os_tmpdir"><code>os.tmpdir()</code></a> instead.</p> | |
<p><a id="DEP0023"></a></p> | |
<h3>DEP0023: os.getNetworkInterfaces()<span><a class="mark" href="#deprecations_dep0023_os_getnetworkinterfaces" id="deprecations_dep0023_os_getnetworkinterfaces">#</a></span></h3> | |
<p>Type: Runtime</p> | |
<p>The <code>os.getNetworkInterfaces()</code> method is deprecated. Please use the | |
-<a href="os.html#os_os_networkinterfaces"><code>os.networkInterfaces</code></a> property instead.</p> | |
+<a href="#os_os_networkinterfaces"><code>os.networkInterfaces</code></a> property instead.</p> | |
<p><a id="DEP0024"></a></p> | |
<h3>DEP0024: REPLServer.prototype.convertToContext()<span><a class="mark" href="#deprecations_dep0024_replserver_prototype_converttocontext" id="deprecations_dep0024_replserver_prototype_converttocontext">#</a></span></h3> | |
<p>Type: End-of-Life</p> | |
@@ -17499,31 +17470,31 @@ | |
<p><a id="DEP0026"></a></p> | |
<h3>DEP0026: util.print()<span><a class="mark" href="#deprecations_dep0026_util_print" id="deprecations_dep0026_util_print">#</a></span></h3> | |
<p>Type: Runtime</p> | |
-<p>The <a href="util.html#util_util_print_strings"><code>util.print()</code></a> API is deprecated. Please use <a href="console.html#console_console_log_data_args"><code>console.log()</code></a> | |
+<p>The <a href="#util_util_print_strings"><code>util.print()</code></a> API is deprecated. Please use <a href="#console_console_log_data_args"><code>console.log()</code></a> | |
instead.</p> | |
<p><a id="DEP0027"></a></p> | |
<h3>DEP0027: util.puts()<span><a class="mark" href="#deprecations_dep0027_util_puts" id="deprecations_dep0027_util_puts">#</a></span></h3> | |
<p>Type: Runtime</p> | |
-<p>The <a href="util.html#util_util_puts_strings"><code>util.puts()</code></a> API is deprecated. Please use <a href="console.html#console_console_log_data_args"><code>console.log()</code></a> instead.</p> | |
+<p>The <a href="#util_util_puts_strings"><code>util.puts()</code></a> API is deprecated. Please use <a href="#console_console_log_data_args"><code>console.log()</code></a> instead.</p> | |
<p><a id="DEP0028"></a></p> | |
<h3>DEP0028: util.debug()<span><a class="mark" href="#deprecations_dep0028_util_debug" id="deprecations_dep0028_util_debug">#</a></span></h3> | |
<p>Type: Runtime</p> | |
-<p>The <a href="util.html#util_util_debug_string"><code>util.debug()</code></a> API is deprecated. Please use <a href="console.html#console_console_error_data_args"><code>console.error()</code></a> | |
+<p>The <a href="#util_util_debug_string"><code>util.debug()</code></a> API is deprecated. Please use <a href="#console_console_error_data_args"><code>console.error()</code></a> | |
instead.</p> | |
<p><a id="DEP0029"></a></p> | |
<h3>DEP0029: util.error()<span><a class="mark" href="#deprecations_dep0029_util_error" id="deprecations_dep0029_util_error">#</a></span></h3> | |
<p>Type: Runtime</p> | |
-<p>The <a href="util.html#util_util_error_strings"><code>util.error()</code></a> API is deprecated. Please use <a href="console.html#console_console_error_data_args"><code>console.error()</code></a> | |
+<p>The <a href="#util_util_error_strings"><code>util.error()</code></a> API is deprecated. Please use <a href="#console_console_error_data_args"><code>console.error()</code></a> | |
instead.</p> | |
<p><a id="DEP0030"></a></p> | |
<h3>DEP0030: SlowBuffer<span><a class="mark" href="#deprecations_dep0030_slowbuffer" id="deprecations_dep0030_slowbuffer">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="buffer.html#buffer_class_slowbuffer"><code>SlowBuffer</code></a> class is deprecated. Please use | |
-<a href="buffer.html#buffer_class_method_buffer_allocunsafeslow_size"><code>Buffer.allocUnsafeSlow(size)</code></a> instead.</p> | |
+<p>The <a href="#buffer_class_slowbuffer"><code>SlowBuffer</code></a> class is deprecated. Please use | |
+<a href="#buffer_class_method_buffer_allocunsafeslow_size"><code>Buffer.allocUnsafeSlow(size)</code></a> instead.</p> | |
<p><a id="DEP0031"></a></p> | |
<h3>DEP0031: ecdh.setPublicKey()<span><a class="mark" href="#deprecations_dep0031_ecdh_setpublickey" id="deprecations_dep0031_ecdh_setpublickey">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="crypto.html#crypto_ecdh_setpublickey_publickey_encoding"><code>ecdh.setPublicKey()</code></a> method is now deprecated as its inclusion in the | |
+<p>The <a href="#crypto_ecdh_setpublickey_publickey_encoding"><code>ecdh.setPublicKey()</code></a> method is now deprecated as its inclusion in the | |
API is not useful.</p> | |
<p><a id="DEP0032"></a></p> | |
<h3>DEP0032: domain module<span><a class="mark" href="#deprecations_dep0032_domain_module" id="deprecations_dep0032_domain_module">#</a></span></h3> | |
@@ -17532,25 +17503,25 @@ | |
<p><a id="DEP0033"></a></p> | |
<h3>DEP0033: EventEmitter.listenerCount()<span><a class="mark" href="#deprecations_dep0033_eventemitter_listenercount" id="deprecations_dep0033_eventemitter_listenercount">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="events.html#events_eventemitter_listenercount_emitter_eventname"><code>EventEmitter.listenerCount(emitter, eventName)</code></a> API is | |
-deprecated. Please use <a href="events.html#events_emitter_listenercount_eventname"><code>emitter.listenerCount(eventName)</code></a> instead.</p> | |
+<p>The <a href="#events_eventemitter_listenercount_emitter_eventname"><code>EventEmitter.listenerCount(emitter, eventName)</code></a> API is | |
+deprecated. Please use <a href="#events_emitter_listenercount_eventname"><code>emitter.listenerCount(eventName)</code></a> instead.</p> | |
<p><a id="DEP0034"></a></p> | |
<h3>DEP0034: fs.exists(path, callback)<span><a class="mark" href="#deprecations_dep0034_fs_exists_path_callback" id="deprecations_dep0034_fs_exists_path_callback">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="fs.html#fs_fs_exists_path_callback"><code>fs.exists(path, callback)</code></a> API is deprecated. Please use | |
-<a href="#fs_fs_stat_path_options_callback"><code>fs.stat()</code></a> or <a href="#fs_fs_access_path_mode_callback"><code>fs.access()</code></a> instead.</p> | |
+<p>The <a href="#fs_fs_exists_path_callback"><code>fs.exists(path, callback)</code></a> API is deprecated. Please use | |
+<a href="#fs_fs_stat_path_callback"><code>fs.stat()</code></a> or <a href="#fs_fs_access_path_mode_callback"><code>fs.access()</code></a> instead.</p> | |
<p><a id="DEP0035"></a></p> | |
<h3>DEP0035: fs.lchmod(path, mode, callback)<span><a class="mark" href="#deprecations_dep0035_fs_lchmod_path_mode_callback" id="deprecations_dep0035_fs_lchmod_path_mode_callback">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="fs.html#fs_fs_lchmod_path_mode_callback"><code>fs.lchmod(path, mode, callback)</code></a> API is deprecated.</p> | |
+<p>The <a href="#fs_fs_lchmod_path_mode_callback"><code>fs.lchmod(path, mode, callback)</code></a> API is deprecated.</p> | |
<p><a id="DEP0036"></a></p> | |
<h3>DEP0036: fs.lchmodSync(path, mode)<span><a class="mark" href="#deprecations_dep0036_fs_lchmodsync_path_mode" id="deprecations_dep0036_fs_lchmodsync_path_mode">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="fs.html#fs_fs_lchmodsync_path_mode"><code>fs.lchmodSync(path, mode)</code></a> API is deprecated.</p> | |
+<p>The <a href="#fs_fs_lchmodsync_path_mode"><code>fs.lchmodSync(path, mode)</code></a> API is deprecated.</p> | |
<p><a id="DEP0039"></a></p> | |
<h3>DEP0039: require.extensions<span><a class="mark" href="#deprecations_dep0039_require_extensions" id="deprecations_dep0039_require_extensions">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="modules.html#modules_require_extensions"><code>require.extensions</code></a> property is deprecated.</p> | |
+<p>The <a href="#modules_require_extensions"><code>require.extensions</code></a> property is deprecated.</p> | |
<p><a id="DEP0040"></a></p> | |
<h3>DEP0040: punycode module<span><a class="mark" href="#deprecations_dep0040_punycode_module" id="deprecations_dep0040_punycode_module">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
@@ -17564,83 +17535,83 @@ | |
<p><a id="DEP0042"></a></p> | |
<h3>DEP0042: tls.CryptoStream<span><a class="mark" href="#deprecations_dep0042_tls_cryptostream" id="deprecations_dep0042_tls_cryptostream">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="tls.html#tls_class_cryptostream"><code>tls.CryptoStream</code></a> class is deprecated. Please use | |
+<p>The <a href="#tls_class_cryptostream"><code>tls.CryptoStream</code></a> class is deprecated. Please use | |
<a href="#tls_class_tls_tlssocket"><code>tls.TLSSocket</code></a> instead.</p> | |
<p><a id="DEP0043"></a></p> | |
<h3>DEP0043: tls.SecurePair<span><a class="mark" href="#deprecations_dep0043_tls_securepair" id="deprecations_dep0043_tls_securepair">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="tls.html#tls_class_securepair"><code>tls.SecurePair</code></a> class is deprecated. Please use | |
+<p>The <a href="#tls_class_securepair"><code>tls.SecurePair</code></a> class is deprecated. Please use | |
<a href="#tls_class_tls_tlssocket"><code>tls.TLSSocket</code></a> instead.</p> | |
<p><a id="DEP0044"></a></p> | |
<h3>DEP0044: util.isArray()<span><a class="mark" href="#deprecations_dep0044_util_isarray" id="deprecations_dep0044_util_isarray">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_isarray_object"><code>util.isArray()</code></a> API is deprecated. Please use <code>Array.isArray()</code> | |
+<p>The <a href="#util_util_isarray_object"><code>util.isArray()</code></a> API is deprecated. Please use <code>Array.isArray()</code> | |
instead.</p> | |
<p><a id="DEP0045"></a></p> | |
<h3>DEP0045: util.isBoolean()<span><a class="mark" href="#deprecations_dep0045_util_isboolean" id="deprecations_dep0045_util_isboolean">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_isboolean_object"><code>util.isBoolean()</code></a> API is deprecated.</p> | |
+<p>The <a href="#util_util_isboolean_object"><code>util.isBoolean()</code></a> API is deprecated.</p> | |
<p><a id="DEP0046"></a></p> | |
<h3>DEP0046: util.isBuffer()<span><a class="mark" href="#deprecations_dep0046_util_isbuffer" id="deprecations_dep0046_util_isbuffer">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_isbuffer_object"><code>util.isBuffer()</code></a> API is deprecated. Please use | |
-<a href="buffer.html#buffer_class_method_buffer_isbuffer_obj"><code>Buffer.isBuffer()</code></a> instead.</p> | |
+<p>The <a href="#util_util_isbuffer_object"><code>util.isBuffer()</code></a> API is deprecated. Please use | |
+<a href="#buffer_class_method_buffer_isbuffer_obj"><code>Buffer.isBuffer()</code></a> instead.</p> | |
<p><a id="DEP0047"></a></p> | |
<h3>DEP0047: util.isDate()<span><a class="mark" href="#deprecations_dep0047_util_isdate" id="deprecations_dep0047_util_isdate">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_isdate_object"><code>util.isDate()</code></a> API is deprecated.</p> | |
+<p>The <a href="#util_util_isdate_object"><code>util.isDate()</code></a> API is deprecated.</p> | |
<p><a id="DEP0048"></a></p> | |
<h3>DEP0048: util.isError()<span><a class="mark" href="#deprecations_dep0048_util_iserror" id="deprecations_dep0048_util_iserror">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_iserror_object"><code>util.isError()</code></a> API is deprecated.</p> | |
+<p>The <a href="#util_util_iserror_object"><code>util.isError()</code></a> API is deprecated.</p> | |
<p><a id="DEP0049"></a></p> | |
<h3>DEP0049: util.isFunction()<span><a class="mark" href="#deprecations_dep0049_util_isfunction" id="deprecations_dep0049_util_isfunction">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_isfunction_object"><code>util.isFunction()</code></a> API is deprecated.</p> | |
+<p>The <a href="#util_util_isfunction_object"><code>util.isFunction()</code></a> API is deprecated.</p> | |
<p><a id="DEP0050"></a></p> | |
<h3>DEP0050: util.isNull()<span><a class="mark" href="#deprecations_dep0050_util_isnull" id="deprecations_dep0050_util_isnull">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_isnull_object"><code>util.isNull()</code></a> API is deprecated.</p> | |
+<p>The <a href="#util_util_isnull_object"><code>util.isNull()</code></a> API is deprecated.</p> | |
<p><a id="DEP0051"></a></p> | |
<h3>DEP0051: util.isNullOrUndefined()<span><a class="mark" href="#deprecations_dep0051_util_isnullorundefined" id="deprecations_dep0051_util_isnullorundefined">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_isnullorundefined_object"><code>util.isNullOrUndefined()</code></a> API is deprecated.</p> | |
+<p>The <a href="#util_util_isnullorundefined_object"><code>util.isNullOrUndefined()</code></a> API is deprecated.</p> | |
<p><a id="DEP0052"></a></p> | |
<h3>DEP0052: util.isNumber()<span><a class="mark" href="#deprecations_dep0052_util_isnumber" id="deprecations_dep0052_util_isnumber">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_isnumber_object"><code>util.isNumber()</code></a> API is deprecated.</p> | |
+<p>The <a href="#util_util_isnumber_object"><code>util.isNumber()</code></a> API is deprecated.</p> | |
<p><a id="DEP0053"></a></p> | |
<h3>DEP0053 util.isObject()<span><a class="mark" href="#deprecations_dep0053_util_isobject" id="deprecations_dep0053_util_isobject">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_isobject_object"><code>util.isObject()</code></a> API is deprecated.</p> | |
+<p>The <a href="#util_util_isobject_object"><code>util.isObject()</code></a> API is deprecated.</p> | |
<p><a id="DEP0054"></a></p> | |
<h3>DEP0054: util.isPrimitive()<span><a class="mark" href="#deprecations_dep0054_util_isprimitive" id="deprecations_dep0054_util_isprimitive">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_isprimitive_object"><code>util.isPrimitive()</code></a> API is deprecated.</p> | |
+<p>The <a href="#util_util_isprimitive_object"><code>util.isPrimitive()</code></a> API is deprecated.</p> | |
<p><a id="DEP0055"></a></p> | |
<h3>DEP0055: util.isRegExp()<span><a class="mark" href="#deprecations_dep0055_util_isregexp" id="deprecations_dep0055_util_isregexp">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_isregexp_object"><code>util.isRegExp()</code></a> API is deprecated.</p> | |
+<p>The <a href="#util_util_isregexp_object"><code>util.isRegExp()</code></a> API is deprecated.</p> | |
<p><a id="DEP0056"></a></p> | |
<h3>DEP0056: util.isString()<span><a class="mark" href="#deprecations_dep0056_util_isstring" id="deprecations_dep0056_util_isstring">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_isstring_object"><code>util.isString()</code></a> API is deprecated.</p> | |
+<p>The <a href="#util_util_isstring_object"><code>util.isString()</code></a> API is deprecated.</p> | |
<p><a id="DEP0057"></a></p> | |
<h3>DEP0057: util.isSymbol()<span><a class="mark" href="#deprecations_dep0057_util_issymbol" id="deprecations_dep0057_util_issymbol">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_issymbol_object"><code>util.isSymbol()</code></a> API is deprecated.</p> | |
+<p>The <a href="#util_util_issymbol_object"><code>util.isSymbol()</code></a> API is deprecated.</p> | |
<p><a id="DEP0058"></a></p> | |
<h3>DEP0058: util.isUndefined()<span><a class="mark" href="#deprecations_dep0058_util_isundefined" id="deprecations_dep0058_util_isundefined">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_isundefined_object"><code>util.isUndefined()</code></a> API is deprecated.</p> | |
+<p>The <a href="#util_util_isundefined_object"><code>util.isUndefined()</code></a> API is deprecated.</p> | |
<p><a id="DEP0059"></a></p> | |
<h3>DEP0059: util.log()<span><a class="mark" href="#deprecations_dep0059_util_log" id="deprecations_dep0059_util_log">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_log_string"><code>util.log()</code></a> API is deprecated.</p> | |
+<p>The <a href="#util_util_log_string"><code>util.log()</code></a> API is deprecated.</p> | |
<p><a id="DEP0060"></a></p> | |
<h3>DEP0060: util._extend()<span><a class="mark" href="#deprecations_dep0060_util_extend" id="deprecations_dep0060_util_extend">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="util.html#util_util_extend_target_source"><code>util._extend()</code></a> API is deprecated.</p> | |
+<p>The <a href="#util_util_extend_target_source"><code>util._extend()</code></a> API is deprecated.</p> | |
<p><a id="DEP0061"></a></p> | |
<h3>DEP0061: fs.SyncWriteStream<span><a class="mark" href="#deprecations_dep0061_fs_syncwritestream" id="deprecations_dep0061_fs_syncwritestream">#</a></span></h3> | |
<p>Type: End-of-Life</p> | |
@@ -17732,7 +17703,7 @@ | |
<h3>DEP0074: REPLServer.bufferedCommand<span><a class="mark" href="#deprecations_dep0074_replserver_bufferedcommand" id="deprecations_dep0074_replserver_bufferedcommand">#</a></span></h3> | |
<p>Type: Runtime</p> | |
<p>The <code>REPLServer.bufferedCommand</code> property was deprecated in favor of | |
-<a href="repl.html#repl_replserver_clearbufferedcommand"><code>REPLServer.clearBufferedCommand()</code></a>.</p> | |
+<a href="#repl_replserver_clearbufferedcommand"><code>REPLServer.clearBufferedCommand()</code></a>.</p> | |
<p><a id="DEP0075"></a></p> | |
<h3>DEP0075: REPLServer.parseREPLKeyword()<span><a class="mark" href="#deprecations_dep0075_replserver_parsereplkeyword" id="deprecations_dep0075_replserver_parsereplkeyword">#</a></span></h3> | |
<p>Type: Runtime</p> | |
@@ -17766,7 +17737,7 @@ | |
<h3>DEP0079: Custom inspection function on Objects via .inspect()<span><a class="mark" href="#deprecations_dep0079_custom_inspection_function_on_objects_via_inspect" id="deprecations_dep0079_custom_inspection_function_on_objects_via_inspect">#</a></span></h3> | |
<p>Type: End-of-Life</p> | |
<p>Using a property named <code>inspect</code> on an object to specify a custom inspection | |
-function for <a href="#util_util_inspect_object_options"><code>util.inspect()</code></a> is deprecated. Use <a href="util.html#util_util_inspect_custom"><code>util.inspect.custom</code></a> | |
+function for <a href="#util_util_inspect_object_options"><code>util.inspect()</code></a> is deprecated. Use <a href="#util_util_inspect_custom"><code>util.inspect.custom</code></a> | |
instead. For backward compatibility with Node.js prior to version 6.4.0, both | |
may be specified.</p> | |
<p><a id="DEP0080"></a></p> | |
@@ -17842,14 +17813,14 @@ | |
<h3>DEP0090: Invalid GCM authentication tag lengths<span><a class="mark" href="#deprecations_dep0090_invalid_gcm_authentication_tag_lengths" id="deprecations_dep0090_invalid_gcm_authentication_tag_lengths">#</a></span></h3> | |
<p>Type: End-of-Life</p> | |
<p>Node.js used to support all GCM authentication tag lengths which are accepted by | |
-OpenSSL when calling <a href="crypto.html#crypto_decipher_setauthtag_buffer"><code>decipher.setAuthTag()</code></a>. Beginning with node REPLACEME, | |
+OpenSSL when calling <a href="#crypto_decipher_setauthtag_buffer"><code>decipher.setAuthTag()</code></a>. Beginning with node REPLACEME, | |
only authentication tag lengths of 128, 120, 112, 104, 96, 64, and 32 bits are | |
allowed. Authentication tags whose length is not included in this list are | |
considered invalid in compliance with <a href="http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf">NIST SP 800-38D</a>.</p> | |
<p><a id="DEP0091"></a></p> | |
<h3>DEP0091: crypto.DEFAULT_ENCODING<span><a class="mark" href="#deprecations_dep0091_crypto_default_encoding" id="deprecations_dep0091_crypto_default_encoding">#</a></span></h3> | |
<p>Type: Runtime</p> | |
-<p>The <a href="crypto.html#crypto_crypto_default_encoding"><code>crypto.DEFAULT_ENCODING</code></a> property is deprecated.</p> | |
+<p>The <a href="#crypto_crypto_default_encoding"><code>crypto.DEFAULT_ENCODING</code></a> property is deprecated.</p> | |
<p><a id="DEP0092"></a></p> | |
<h3>DEP0092: Top-level <code>this</code> bound to <code>module.exports</code><span><a class="mark" href="#deprecations_dep0092_top_level_this_bound_to_module_exports" id="deprecations_dep0092_top_level_this_bound_to_module_exports">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
@@ -17859,7 +17830,7 @@ | |
<p><a id="DEP0093"></a></p> | |
<h3>DEP0093: crypto.fips is deprecated and replaced.<span><a class="mark" href="#deprecations_dep0093_crypto_fips_is_deprecated_and_replaced" id="deprecations_dep0093_crypto_fips_is_deprecated_and_replaced">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>The <a href="crypto.html#crypto_crypto_fips"><code>crypto.fips</code></a> property is deprecated. Please use <code>crypto.setFips()</code> | |
+<p>The <a href="#crypto_crypto_fips"><code>crypto.fips</code></a> property is deprecated. Please use <code>crypto.setFips()</code> | |
and <code>crypto.getFips()</code> instead.</p> | |
<p><a id="DEP0094"></a></p> | |
<h3>DEP0094: Using <code>assert.fail()</code> with more than one argument.<span><a class="mark" href="#deprecations_dep0094_using_assert_fail_with_more_than_one_argument" id="deprecations_dep0094_using_assert_fail_with_more_than_one_argument">#</a></span></h3> | |
@@ -17871,12 +17842,12 @@ | |
<h3>DEP0095: timers.enroll()<span><a class="mark" href="#deprecations_dep0095_timers_enroll" id="deprecations_dep0095_timers_enroll">#</a></span></h3> | |
<p>Type: Runtime</p> | |
<p><code>timers.enroll()</code> is deprecated. Please use the publicly documented | |
-<a href="timers.html#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a> or <a href="timers.html#timers_setinterval_callback_delay_args"><code>setInterval()</code></a> instead.</p> | |
+<a href="#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a> or <a href="#timers_setinterval_callback_delay_args"><code>setInterval()</code></a> instead.</p> | |
<p><a id="DEP0096"></a></p> | |
<h3>DEP0096: timers.unenroll()<span><a class="mark" href="#deprecations_dep0096_timers_unenroll" id="deprecations_dep0096_timers_unenroll">#</a></span></h3> | |
<p>Type: Runtime</p> | |
<p><code>timers.unenroll()</code> is deprecated. Please use the publicly documented | |
-<a href="timers.html#timers_cleartimeout_timeout"><code>clearTimeout()</code></a> or <a href="timers.html#timers_clearinterval_timeout"><code>clearInterval()</code></a> instead.</p> | |
+<a href="#timers_cleartimeout_timeout"><code>clearTimeout()</code></a> or <a href="#timers_clearinterval_timeout"><code>clearInterval()</code></a> instead.</p> | |
<p><a id="DEP0097"></a></p> | |
<h3>DEP0097: MakeCallback with domain property<span><a class="mark" href="#deprecations_dep0097_makecallback_with_domain_property" id="deprecations_dep0097_makecallback_with_domain_property">#</a></span></h3> | |
<p>Type: Runtime</p> | |
@@ -17889,7 +17860,7 @@ | |
<p>The embedded API provided by AsyncHooks exposes <code>.emitBefore()</code> and | |
<code>.emitAfter()</code> methods which are very easy to use incorrectly which can lead | |
to unrecoverable errors.</p> | |
-<p>Use <a href="async_hooks.html#async_hooks_asyncresource_runinasyncscope_fn_thisarg_args"><code>asyncResource.runInAsyncScope()</code></a> API instead which provides a much | |
+<p>Use <a href="#async_hooks_asyncresource_runinasyncscope_fn_thisarg_args"><code>asyncResource.runInAsyncScope()</code></a> API instead which provides a much | |
safer, and more convenient, alternative. See | |
<a href="https://github.com/nodejs/node/pull/18513">https://github.com/nodejs/node/pull/18513</a> for more details.</p> | |
<p><a id="DEP0099"></a></p> | |
@@ -17915,13 +17886,13 @@ | |
could lead to hard to find errors and crashes.</p> | |
<p><a id="DEP0103"></a></p> | |
<h3>DEP0103: process.binding('util').is[...] typechecks<span><a class="mark" href="#deprecations_dep0103_process_binding_util_is_typechecks" id="deprecations_dep0103_process_binding_util_is_typechecks">#</a></span></h3> | |
-<p>Type: Documentation-only (supports <a href="cli.html#cli_pending_deprecation"><code>--pending-deprecation</code></a>)</p> | |
+<p>Type: Documentation-only (supports <a href="#cli_pending_deprecation"><code>--pending-deprecation</code></a>)</p> | |
<p>Using <code>process.binding()</code> in general should be avoided. The type checking | |
-methods in particular can be replaced by using <a href="util.html#util_util_types"><code>util.types</code></a>.</p> | |
+methods in particular can be replaced by using <a href="#util_util_types"><code>util.types</code></a>.</p> | |
<p><a id="DEP0104"></a></p> | |
<h3>DEP0104: process.env string coercion<span><a class="mark" href="#deprecations_dep0104_process_env_string_coercion" id="deprecations_dep0104_process_env_string_coercion">#</a></span></h3> | |
-<p>Type: Documentation-only (supports <a href="cli.html#cli_pending_deprecation"><code>--pending-deprecation</code></a>)</p> | |
-<p>When assigning a non-string property to <a href="process.html#process_process_env"><code>process.env</code></a>, the assigned value is | |
+<p>Type: Documentation-only (supports <a href="#cli_pending_deprecation"><code>--pending-deprecation</code></a>)</p> | |
+<p>When assigning a non-string property to <a href="#process_process_env"><code>process.env</code></a>, the assigned value is | |
implicitly converted to a string. This behavior is deprecated if the assigned | |
value is not a string, boolean, or number. In the future, such assignment may | |
result in a thrown error. Please convert the property to a string before | |
@@ -17930,16 +17901,16 @@ | |
<h3>DEP0105: decipher.finaltol<span><a class="mark" href="#deprecations_dep0105_decipher_finaltol" id="deprecations_dep0105_decipher_finaltol">#</a></span></h3> | |
<p>Type: End-of-Life</p> | |
<p><code>decipher.finaltol()</code> has never been documented and was an alias for | |
-<a href="crypto.html#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a>. This API has been removed, and it is recommended to use | |
-<a href="crypto.html#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a> instead.</p> | |
+<a href="#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a>. This API has been removed, and it is recommended to use | |
+<a href="#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a> instead.</p> | |
<p><a id="DEP0106"></a></p> | |
<h3>DEP0106: crypto.createCipher and crypto.createDecipher<span><a class="mark" href="#deprecations_dep0106_crypto_createcipher_and_crypto_createdecipher" id="deprecations_dep0106_crypto_createcipher_and_crypto_createdecipher">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
-<p>Using <a href="crypto.html#crypto_crypto_createcipher_algorithm_password_options"><code>crypto.createCipher()</code></a> and <a href="crypto.html#crypto_crypto_createdecipher_algorithm_password_options"><code>crypto.createDecipher()</code></a> should be | |
+<p>Using <a href="#crypto_crypto_createcipher_algorithm_password_options"><code>crypto.createCipher()</code></a> and <a href="#crypto_crypto_createdecipher_algorithm_password_options"><code>crypto.createDecipher()</code></a> should be | |
avoided as they use a weak key derivation function (MD5 with no salt) and static | |
initialization vectors. It is recommended to derive a key using | |
-<a href="crypto.html#crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback"><code>crypto.pbkdf2()</code></a> and to use <a href="crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options"><code>crypto.createCipheriv()</code></a> and | |
-<a href="crypto.html#crypto_crypto_createdecipheriv_algorithm_key_iv_options"><code>crypto.createDecipheriv()</code></a> to obtain the <a href="crypto.html#crypto_class_cipher"><code>Cipher</code></a> and <a href="crypto.html#crypto_class_decipher"><code>Decipher</code></a> | |
+<a href="#crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback"><code>crypto.pbkdf2()</code></a> and to use <a href="#crypto_crypto_createcipheriv_algorithm_key_iv_options"><code>crypto.createCipheriv()</code></a> and | |
+<a href="#crypto_crypto_createdecipheriv_algorithm_key_iv_options"><code>crypto.createDecipheriv()</code></a> to obtain the <a href="#crypto_class_cipher"><code>Cipher</code></a> and <a href="#crypto_class_decipher"><code>Decipher</code></a> | |
objects respectively.</p> | |
<p><a id="DEP0107"></a></p> | |
<h3>DEP0107: tls.convertNPNProtocols()<span><a class="mark" href="#deprecations_dep0107_tls_convertnpnprotocols" id="deprecations_dep0107_tls_convertnpnprotocols">#</a></span></h3> | |
@@ -17957,8 +17928,8 @@ | |
<h3>DEP0109: http, https, and tls support for invalid URLs<span><a class="mark" href="#deprecations_dep0109_http_https_and_tls_support_for_invalid_urls" id="deprecations_dep0109_http_https_and_tls_support_for_invalid_urls">#</a></span></h3> | |
<p>Type: Runtime</p> | |
<p>Some previously supported (but strictly invalid) URLs were accepted through the | |
-<a href="http.html#http_http_request_options_callback"><code>http.request()</code></a>, <a href="http.html#http_http_get_options_callback"><code>http.get()</code></a>, <a href="#https_https_request_options_callback"><code>https.request()</code></a>, | |
-<a href="https.html#https_https_get_options_callback"><code>https.get()</code></a>, and <a href="tls.html#tls_tls_checkserveridentity_hostname_cert"><code>tls.checkServerIdentity()</code></a> APIs because those were | |
+<a href="#http_http_request_options_callback"><code>http.request()</code></a>, <a href="#http_http_get_options_callback"><code>http.get()</code></a>, <a href="#https_https_request_options_callback"><code>https.request()</code></a>, | |
+<a href="#https_https_get_options_callback"><code>https.get()</code></a>, and <a href="#tls_tls_checkserveridentity_hostname_cert"><code>tls.checkServerIdentity()</code></a> APIs because those were | |
accepted by the legacy <code>url.parse()</code> API. The mentioned APIs now use the WHATWG | |
URL parser that requires strictly valid URLs. Passing an invalid URL is | |
deprecated and support will be removed in the future.</p> | |
@@ -17966,17 +17937,15 @@ | |
<h3>DEP0110: vm.Script cached data<span><a class="mark" href="#deprecations_dep0110_vm_script_cached_data" id="deprecations_dep0110_vm_script_cached_data">#</a></span></h3> | |
<p>Type: Documentation-only</p> | |
<p>The option <code>produceCachedData</code> has been deprecated. Use | |
-<a href="vm.html#vm_script_createcacheddata"><code>script.createCachedData()</code></a> instead.</p> | |
-<!-- [end-include:deprecations.md] --> | |
-<!-- [start-include:dns.md] --> | |
+<a href="#vm_script_createcacheddata"><code>script.createCachedData()</code></a> instead.</p> | |
<h1>DNS<span><a class="mark" href="#dns_dns" id="dns_dns">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>dns</code> module contains functions belonging to two different categories:</p> | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>dns</code> module contains functions belonging to two different categories:</p> | |
<p>1) Functions that use the underlying operating system facilities to perform | |
name resolution, and that do not necessarily perform any network communication. | |
-This category contains only one function: <a href="dns.html#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>. <strong>Developers | |
+This category contains only one function: <a href="#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>. <strong>Developers | |
looking to perform name resolution in the same way that other applications on | |
-the same operating system behave should use <a href="dns.html#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>.</strong></p> | |
+the same operating system behave should use <a href="#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>.</strong></p> | |
<p>For example, looking up <code>iana.org</code>.</p> | |
<pre><code class="lang-js">const dns = require('dns'); | |
@@ -17987,9 +17956,9 @@ | |
</code></pre> | |
<p>2) Functions that connect to an actual DNS server to perform name resolution, | |
and that <em>always</em> use the network to perform DNS queries. This category | |
-contains all functions in the <code>dns</code> module <em>except</em> <a href="dns.html#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>. These | |
+contains all functions in the <code>dns</code> module <em>except</em> <a href="#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>. These | |
functions do not use the same set of configuration files used by | |
-<a href="dns.html#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a> (e.g. <code>/etc/hosts</code>). These functions should be used by | |
+<a href="#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a> (e.g. <code>/etc/hosts</code>). These functions should be used by | |
developers who do not want to use the underlying operating system's facilities | |
for name resolution, and instead want to <em>always</em> perform DNS queries.</p> | |
<p>Below is an example that resolves <code>'archive.org'</code> then reverse resolves the IP | |
@@ -18114,7 +18083,7 @@ | |
<p>With the <code>all</code> option set to <code>true</code>, the arguments for <code>callback</code> change to | |
<code>(err, addresses)</code>, with <code>addresses</code> being an array of objects with the | |
properties <code>address</code> and <code>family</code>.</p> | |
-<p>On error, <code>err</code> is an <a href="errors.html#errors_class_error"><code>Error</code></a> object, where <code>err.code</code> is the error code. | |
+<p>On error, <code>err</code> is an <a href="#errors_class_error"><code>Error</code></a> object, where <code>err.code</code> is the error code. | |
Keep in mind that <code>err.code</code> will be set to <code>'ENOENT'</code> not only when | |
the hostname does not exist but also when the lookup fails in other ways | |
such as no available file descriptors.</p> | |
@@ -18144,7 +18113,7 @@ | |
is not set to <code>true</code>, it returns a <code>Promise</code> for an <code>Object</code> with <code>address</code> and | |
<code>family</code> properties.</p> | |
<h3>Supported getaddrinfo flags<span><a class="mark" href="#dns_supported_getaddrinfo_flags" id="dns_supported_getaddrinfo_flags">#</a></span></h3> | |
-<p>The following flags can be passed as hints to <a href="dns.html#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>.</p> | |
+<p>The following flags can be passed as hints to <a href="#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>.</p> | |
<ul> | |
<li><code>dns.ADDRCONFIG</code>: Returned address types are determined by the types | |
of addresses supported by the current system. For example, IPv4 addresses | |
@@ -18172,7 +18141,7 @@ | |
<p>If <code>address</code> is not a valid IP address, a <code>TypeError</code> will be thrown. | |
The <code>port</code> will be coerced to a number. If it is not a legal port, a <code>TypeError</code> | |
will be thrown.</p> | |
-<p>On an error, <code>err</code> is an <a href="errors.html#errors_class_error"><code>Error</code></a> object, where <code>err.code</code> is the error code.</p> | |
+<p>On an error, <code>err</code> is an <a href="#errors_class_error"><code>Error</code></a> object, where <code>err.code</code> is the error code.</p> | |
<pre><code class="lang-js">const dns = require('dns'); | |
dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { | |
console.log(hostname, service); | |
@@ -18275,7 +18244,7 @@ | |
</tr> | |
</tbody> | |
</table> | |
-<p>On error, <code>err</code> is an <a href="errors.html#errors_class_error"><code>Error</code></a> object, where <code>err.code</code> is one of the | |
+<p>On error, <code>err</code> is an <a href="#errors_class_error"><code>Error</code></a> object, where <code>err.code</code> is one of the | |
<a href="#dns_error_codes">DNS error codes</a>.</p> | |
<h2>dns.resolve4(hostname[, options], callback)<span><a class="mark" href="#dns_dns_resolve4_hostname_options_callback" id="dns_dns_resolve4_hostname_options_callback">#</a></span></h2> | |
<div class="api_metadata"> | |
@@ -18603,7 +18572,7 @@ | |
</ul> | |
<p>Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an | |
array of hostnames.</p> | |
-<p>On error, <code>err</code> is an <a href="errors.html#errors_class_error"><code>Error</code></a> object, where <code>err.code</code> is | |
+<p>On error, <code>err</code> is an <a href="#errors_class_error"><code>Error</code></a> object, where <code>err.code</code> is | |
one of the <a href="#dns_error_codes">DNS error codes</a>.</p> | |
<h2>dns.setServers(servers)<span><a class="mark" href="#dns_dns_setservers_servers" id="dns_dns_setservers_servers">#</a></span></h2> | |
<div class="api_metadata"> | |
@@ -18631,7 +18600,7 @@ | |
subsequent servers provided. Fallback DNS servers will only be used if the | |
earlier ones time out or result in some other error.</p> | |
<h2>DNS Promises API<span><a class="mark" href="#dns_dns_promises_api" id="dns_dns_promises_api">#</a></span></h2> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>The <code>dns.promises</code> API provides an alternative set of asynchronous DNS methods | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>The <code>dns.promises</code> API provides an alternative set of asynchronous DNS methods | |
that return <code>Promise</code> objects rather than using callbacks. The API is accessible | |
via <code>require('dns').promises</code>.</p> | |
<h3>Class: dnsPromises.Resolver<span><a class="mark" href="#dns_class_dnspromises_resolver" id="dns_class_dnspromises_resolver">#</a></span></h3> | |
@@ -18718,7 +18687,7 @@ | |
and IPv6 addresses are both returned if found.</p> | |
<p>With the <code>all</code> option set to <code>true</code>, the <code>Promise</code> is resolved with <code>addresses</code> | |
being an array of objects with the properties <code>address</code> and <code>family</code>.</p> | |
-<p>On error, the <code>Promise</code> is rejected with an <a href="errors.html#errors_class_error"><code>Error</code></a> object, where <code>err.code</code> | |
+<p>On error, the <code>Promise</code> is rejected with an <a href="#errors_class_error"><code>Error</code></a> object, where <code>err.code</code> | |
is the error code. | |
Keep in mind that <code>err.code</code> will be set to <code>'ENOENT'</code> not only when | |
the hostname does not exist but also when the lookup fails in other ways | |
@@ -18761,7 +18730,7 @@ | |
<p>If <code>address</code> is not a valid IP address, a <code>TypeError</code> will be thrown. | |
The <code>port</code> will be coerced to a number. If it is not a legal port, a <code>TypeError</code> | |
will be thrown.</p> | |
-<p>On error, the <code>Promise</code> is rejected with an <a href="errors.html#errors_class_error"><code>Error</code></a> object, where <code>err.code</code> | |
+<p>On error, the <code>Promise</code> is rejected with an <a href="#errors_class_error"><code>Error</code></a> object, where <code>err.code</code> | |
is the error code.</p> | |
<pre><code class="lang-js">const dnsPromises = require('dns').promises; | |
dnsPromises.lookupService('127.0.0.1', 22).then((result) => { | |
@@ -18858,7 +18827,7 @@ | |
</tr> | |
</tbody> | |
</table> | |
-<p>On error, the <code>Promise</code> is rejected with an <a href="errors.html#errors_class_error"><code>Error</code></a> object, where <code>err.code</code> | |
+<p>On error, the <code>Promise</code> is rejected with an <a href="#errors_class_error"><code>Error</code></a> object, where <code>err.code</code> | |
is one of the <a href="#dns_error_codes">DNS error codes</a>.</p> | |
<h3>dnsPromises.resolve4(hostname[, options])<span><a class="mark" href="#dns_dnspromises_resolve4_hostname_options" id="dns_dnspromises_resolve4_hostname_options">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -19106,7 +19075,7 @@ | |
</ul> | |
<p>Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an | |
array of hostnames.</p> | |
-<p>On error, the <code>Promise</code> is rejected with an <a href="errors.html#errors_class_error"><code>Error</code></a> object, where <code>err.code</code> | |
+<p>On error, the <code>Promise</code> is rejected with an <a href="#errors_class_error"><code>Error</code></a> object, where <code>err.code</code> | |
is one of the <a href="#dns_error_codes">DNS error codes</a>.</p> | |
<h3>dnsPromises.setServers(servers)<span><a class="mark" href="#dns_dnspromises_setservers_servers" id="dns_dnspromises_setservers_servers">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -19162,40 +19131,38 @@ | |
<li><code>dns.CANCELLED</code>: DNS query cancelled.</li> | |
</ul> | |
<h2>Implementation considerations<span><a class="mark" href="#dns_implementation_considerations" id="dns_implementation_considerations">#</a></span></h2> | |
-<p>Although <a href="dns.html#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a> and the various <code>dns.resolve*()/dns.reverse()</code> | |
+<p>Although <a href="#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a> and the various <code>dns.resolve*()/dns.reverse()</code> | |
functions have the same goal of associating a network name with a network | |
address (or vice versa), their behavior is quite different. These differences | |
can have subtle but significant consequences on the behavior of Node.js | |
programs.</p> | |
<h3><code>dns.lookup()</code><span><a class="mark" href="#dns_dns_lookup" id="dns_dns_lookup">#</a></span></h3> | |
-<p>Under the hood, <a href="dns.html#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a> uses the same operating system facilities | |
-as most other programs. For instance, <a href="dns.html#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a> will almost always | |
+<p>Under the hood, <a href="#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a> uses the same operating system facilities | |
+as most other programs. For instance, <a href="#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a> will almost always | |
resolve a given name the same way as the <code>ping</code> command. On most POSIX-like | |
-operating systems, the behavior of the <a href="dns.html#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a> function can be | |
+operating systems, the behavior of the <a href="#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a> function can be | |
modified by changing settings in <a href="http://man7.org/linux/man-pages/man5/nsswitch.conf.5.html"><code>nsswitch.conf(5)</code></a> and/or <a href="http://man7.org/linux/man-pages/man5/resolv.conf.5.html"><code>resolv.conf(5)</code></a>, | |
but note that changing these files will change the behavior of <em>all other | |
programs running on the same operating system</em>.</p> | |
<p>Though the call to <code>dns.lookup()</code> will be asynchronous from JavaScript's | |
perspective, it is implemented as a synchronous call to <a href="http://man7.org/linux/man-pages/man3/getaddrinfo.3.html"><code>getaddrinfo(3)</code></a> that runs | |
on libuv's threadpool. This can have surprising negative performance | |
-implications for some applications, see the <a href="cli.html#cli_uv_threadpool_size_size"><code>UV_THREADPOOL_SIZE</code></a> | |
+implications for some applications, see the <a href="#cli_uv_threadpool_size_size"><code>UV_THREADPOOL_SIZE</code></a> | |
documentation for more information.</p> | |
<p>Note that various networking APIs will call <code>dns.lookup()</code> internally to resolve | |
host names. If that is an issue, consider resolving the hostname to and address | |
using <code>dns.resolve()</code> and using the address instead of a host name. Also, some | |
-networking APIs (such as <a href="#net_socket_connect"><code>socket.connect()</code></a> and <a href="#dgram_dgram_createsocket_options_callback"><code>dgram.createSocket()</code></a>) | |
+networking APIs (such as <a href="#net_socket_connect_options_connectlistener"><code>socket.connect()</code></a> and <a href="#dgram_dgram_createsocket_options_callback"><code>dgram.createSocket()</code></a>) | |
allow the default resolver, <code>dns.lookup()</code>, to be replaced.</p> | |
<h3><code>dns.resolve()</code>, <code>dns.resolve*()</code> and <code>dns.reverse()</code><span><a class="mark" href="#dns_dns_resolve_dns_resolve_and_dns_reverse" id="dns_dns_resolve_dns_resolve_and_dns_reverse">#</a></span></h3> | |
-<p>These functions are implemented quite differently than <a href="dns.html#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>. They | |
+<p>These functions are implemented quite differently than <a href="#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>. They | |
do not use <a href="http://man7.org/linux/man-pages/man3/getaddrinfo.3.html"><code>getaddrinfo(3)</code></a> and they <em>always</em> perform a DNS query on the | |
network. This network communication is always done asynchronously, and does not | |
use libuv's threadpool.</p> | |
<p>As a result, these functions cannot have the same negative impact on other | |
-processing that happens on libuv's threadpool that <a href="dns.html#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a> can have.</p> | |
-<p>They do not use the same set of configuration files than what <a href="dns.html#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a> | |
+processing that happens on libuv's threadpool that <a href="#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a> can have.</p> | |
+<p>They do not use the same set of configuration files than what <a href="#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a> | |
uses. For instance, <em>they do not use the configuration from <code>/etc/hosts</code></em>.</p> | |
-<!-- [end-include:dns.md] --> | |
-<!-- [start-include:domain.md] --> | |
<h1>Domain<span><a class="mark" href="#domain_domain" id="domain_domain">#</a></span></h1> | |
<div class="api_metadata"> | |
<details class="changelog"><summary>History</summary> | |
@@ -19210,7 +19177,7 @@ | |
</table> | |
</details> | |
</div><!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated</div><p><strong>This module is pending deprecation</strong>. Once a replacement API has been | |
+<div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated</div><p><strong>This module is pending deprecation</strong>. Once a replacement API has been | |
finalized, this module will be fully deprecated. Most end users should | |
<strong>not</strong> have cause to use this module. Users who absolutely must have | |
the functionality that domains provide may rely on it for the time being | |
@@ -19432,12 +19399,12 @@ | |
</code></pre> | |
<h2>domain.create()<span><a class="mark" href="#domain_domain_create" id="domain_domain_create">#</a></span></h2> | |
<ul> | |
-<li>Returns: <a href="domain.html#domain_class_domain" class="type"><Domain></a></li> | |
+<li>Returns: <a href="#domain_class_domain" class="type"><Domain></a></li> | |
</ul> | |
<h2>Class: Domain<span><a class="mark" href="#domain_class_domain" id="domain_class_domain">#</a></span></h2> | |
<p>The <code>Domain</code> class encapsulates the functionality of routing errors and | |
uncaught exceptions to the active <code>Domain</code> object.</p> | |
-<p><code>Domain</code> is a child class of <a href="events.html"><code>EventEmitter</code></a>. To handle the errors that it | |
+<p><code>Domain</code> is a child class of <a href="#events_class_eventemitter"><code>EventEmitter</code></a>. To handle the errors that it | |
catches, listen to its <code>'error'</code> event.</p> | |
<h3>domain.members<span><a class="mark" href="#domain_domain_members" id="domain_domain_members">#</a></span></h3> | |
<ul> | |
@@ -19447,14 +19414,14 @@ | |
to the domain.</p> | |
<h3>domain.add(emitter)<span><a class="mark" href="#domain_domain_add_emitter" id="domain_domain_add_emitter">#</a></span></h3> | |
<ul> | |
-<li><code>emitter</code> <a href="events.html#events_class_eventemitter" class="type"><EventEmitter></a> | <a href="timers.html#timers_timers" class="type"><Timer></a> emitter or timer to be added to the domain</li> | |
+<li><code>emitter</code> <a href="#events_class_eventemitter" class="type"><EventEmitter></a> | <a href="#timers_timers" class="type"><Timer></a> emitter or timer to be added to the domain</li> | |
</ul> | |
<p>Explicitly adds an emitter to the domain. If any event handlers called by | |
the emitter throw an error, or if the emitter emits an <code>'error'</code> event, it | |
will be routed to the domain's <code>'error'</code> event, just like with implicit | |
binding.</p> | |
-<p>This also works with timers that are returned from <a href="timers.html#timers_setinterval_callback_delay_args"><code>setInterval()</code></a> and | |
-<a href="timers.html#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a>. If their callback function throws, it will be caught by | |
+<p>This also works with timers that are returned from <a href="#timers_setinterval_callback_delay_args"><code>setInterval()</code></a> and | |
+<a href="#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a>. If their callback function throws, it will be caught by | |
the domain <code>'error'</code> handler.</p> | |
<p>If the Timer or <code>EventEmitter</code> was already bound to a domain, it is removed | |
from that one, and bound to this one instead.</p> | |
@@ -19509,7 +19476,7 @@ | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> The intercepted function</li> | |
</ul> | |
<p>This method is almost identical to <a href="#domain_domain_bind_callback"><code>domain.bind(callback)</code></a>. However, in | |
-addition to catching thrown errors, it will also intercept <a href="errors.html#errors_class_error"><code>Error</code></a> | |
+addition to catching thrown errors, it will also intercept <a href="#errors_class_error"><code>Error</code></a> | |
objects sent as the first argument to the function.</p> | |
<p>In this way, the common <code>if (err) return callback(err);</code> pattern can be replaced | |
with a single error handler in a single place.</p> | |
@@ -19538,7 +19505,7 @@ | |
</code></pre> | |
<h3>domain.remove(emitter)<span><a class="mark" href="#domain_domain_remove_emitter" id="domain_domain_remove_emitter">#</a></span></h3> | |
<ul> | |
-<li><code>emitter</code> <a href="events.html#events_class_eventemitter" class="type"><EventEmitter></a> | <a href="timers.html#timers_timers" class="type"><Timer></a> emitter or timer to be removed from the domain</li> | |
+<li><code>emitter</code> <a href="#events_class_eventemitter" class="type"><EventEmitter></a> | <a href="#timers_timers" class="type"><Timer></a> emitter or timer to be removed from the domain</li> | |
</ul> | |
<p>The opposite of <a href="#domain_domain_add_emitter"><code>domain.add(emitter)</code></a>. Removes domain handling from the | |
specified emitter.</p> | |
@@ -19607,12 +19574,10 @@ | |
<p>Note that domains will not interfere with the error handling mechanisms for | |
Promises, i.e. no <code>'error'</code> event will be emitted for unhandled <code>Promise</code> | |
rejections.</p> | |
-<!-- [end-include:domain.md] --> | |
-<!-- [start-include:esm.md] --> | |
<h1>ECMAScript Modules<span><a class="mark" href="#esm_ecmascript_modules" id="esm_ecmascript_modules">#</a></span></h1> | |
<!--introduced_in=v8.5.0--> | |
<!-- type=misc --> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><!--name=esm--> | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><!--name=esm--> | |
<p>Node.js contains support for ES Modules based upon the | |
<a href="https://github.com/nodejs/node-eps/blob/master/002-es-modules.md">Node.js EP for ES Modules</a>.</p> | |
<p>Not all features of the EP are complete and will be landing as both VM support | |
@@ -19832,8 +19797,6 @@ | |
<p>With the list of module exports provided upfront, the <code>execute</code> function will | |
then be called at the exact point of module evaluation order for that module | |
in the import tree.</p> | |
-<!-- [end-include:esm.md] --> | |
-<!-- [start-include:errors.md] --> | |
<h1>Errors<span><a class="mark" href="#errors_errors" id="errors_errors">#</a></span></h1> | |
<!--introduced_in=v4.0.0--> | |
<!--type=misc--> | |
@@ -19875,7 +19838,7 @@ | |
<em>must</em> be handled using <code>try…catch</code> or the Node.js process will exit | |
immediately.</p> | |
<p>With few exceptions, <em>Synchronous</em> APIs (any blocking method that does not | |
-accept a <code>callback</code> function, such as <a href="fs.html#fs_fs_readfilesync_path_options"><code>fs.readFileSync</code></a>), will use <code>throw</code> | |
+accept a <code>callback</code> function, such as <a href="#fs_fs_readfilesync_path_options"><code>fs.readFileSync</code></a>), will use <code>throw</code> | |
to report errors.</p> | |
<p>Errors that occur within <em>Asynchronous APIs</em> may be reported in multiple ways:</p> | |
<ul> | |
@@ -19896,7 +19859,7 @@ | |
</code></pre> | |
<ul> | |
<li><p>When an asynchronous method is called on an object that is an | |
-<a href="events.html"><code>EventEmitter</code></a>, errors can be routed to that object's <code>'error'</code> event.</p> | |
+<a href="#events_class_eventemitter"><code>EventEmitter</code></a>, errors can be routed to that object's <code>'error'</code> event.</p> | |
<pre><code class="lang-js">const net = require('net'); | |
const connection = net.connect('localhost'); | |
@@ -19919,14 +19882,14 @@ | |
</li> | |
</ul> | |
<p>The use of the <code>'error'</code> event mechanism is most common for <a href="stream.html">stream-based</a> | |
-and <a href="events.html#events_class_eventemitter">event emitter-based</a> APIs, which themselves represent a series of | |
+and <a href="#events_class_eventemitter">event emitter-based</a> APIs, which themselves represent a series of | |
asynchronous operations over time (as opposed to a single operation that may | |
pass or fail).</p> | |
-<p>For <em>all</em> <a href="events.html"><code>EventEmitter</code></a> objects, if an <code>'error'</code> event handler is not | |
+<p>For <em>all</em> <a href="#events_class_eventemitter"><code>EventEmitter</code></a> objects, if an <code>'error'</code> event handler is not | |
provided, the error will be thrown, causing the Node.js process to report an | |
uncaught exception and crash unless either: The <a href="domain.html"><code>domain</code></a> module is | |
used appropriately or a handler has been registered for the | |
-<a href="process.html#process_event_uncaughtexception"><code>'uncaughtException'</code></a> event.</p> | |
+<a href="#process_event_uncaughtexception"><code>'uncaughtException'</code></a> event.</p> | |
<pre><code class="lang-js">const EventEmitter = require('events'); | |
const ee = new EventEmitter(); | |
@@ -20136,7 +20099,7 @@ | |
detailed <a href="#errors_system_errors">here</a>.</p> | |
<h2>Class: AssertionError<span><a class="mark" href="#errors_class_assertionerror" id="errors_class_assertionerror">#</a></span></h2> | |
<p>A subclass of <code>Error</code> that indicates the failure of an assertion. For details, | |
-see <a href="assert.html#assert_class_assert_assertionerror"><code>Class: assert.AssertionError</code></a>.</p> | |
+see <a href="#assert_class_assert_assertionerror"><code>Class: assert.AssertionError</code></a>.</p> | |
<h2>Class: RangeError<span><a class="mark" href="#errors_class_rangeerror" id="errors_class_rangeerror">#</a></span></h2> | |
<p>A subclass of <code>Error</code> that indicates that a provided argument was not within the | |
set or range of acceptable values for a function; whether that is a numeric | |
@@ -20212,9 +20175,9 @@ | |
<li><code>errno</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> The system-provided error number</li> | |
<li><code>message</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> A system-provided human readable description of the error</li> | |
<li><code>syscall</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The name of the system call that triggered the error</li> | |
-<li><code>path</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> When reporting a file system error, the <code>path</code> will identify | |
+<li><code>path</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> When reporting a file system error, the <code>path</code> will identify | |
the file path.</li> | |
-<li><code>dest</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> When reporting a file system error, the <code>dest</code> will identify | |
+<li><code>dest</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> When reporting a file system error, the <code>dest</code> will identify | |
the file path destination (if any).</li> | |
</ul> | |
<h4>error.code<span><a class="mark" href="#errors_error_code_1" id="errors_error_code_1">#</a></span></h4> | |
@@ -20295,10 +20258,10 @@ | |
entity (file or directory) could be found by the given path.</p> | |
</li> | |
<li><p><code>ENOTDIR</code> (Not a directory): A component of the given pathname existed, but | |
-was not a directory as expected. Commonly raised by <a href="fs.html#fs_fs_readdir_path_options_callback"><code>fs.readdir</code></a>.</p> | |
+was not a directory as expected. Commonly raised by <a href="#fs_fs_readdir_path_options_callback"><code>fs.readdir</code></a>.</p> | |
</li> | |
<li><p><code>ENOTEMPTY</code> (Directory not empty): A directory with entries was the target | |
-of an operation that requires an empty directory — usually <a href="fs.html#fs_fs_unlink_path_callback"><code>fs.unlink</code></a>.</p> | |
+of an operation that requires an empty directory — usually <a href="#fs_fs_unlink_path_callback"><code>fs.unlink</code></a>.</p> | |
</li> | |
<li><p><code>EPERM</code> (Operation not permitted): An attempt was made to perform an | |
operation that requires elevated privileges.</p> | |
@@ -20393,10 +20356,10 @@ | |
<p><a id="ERR_CRYPTO_ENGINE_UNKNOWN"></a></p> | |
<h3>ERR_CRYPTO_ENGINE_UNKNOWN<span><a class="mark" href="#errors_err_crypto_engine_unknown" id="errors_err_crypto_engine_unknown">#</a></span><span><a class="mark" href="#ERR_CRYPTO_ENGINE_UNKNOWN" id="ERR_CRYPTO_ENGINE_UNKNOWN">#</a></span></h3> | |
<p>An invalid crypto engine identifier was passed to | |
-<a href="crypto.html#crypto_crypto_setengine_engine_flags"><code>require('crypto').setEngine()</code></a>.</p> | |
+<a href="#crypto_crypto_setengine_engine_flags"><code>require('crypto').setEngine()</code></a>.</p> | |
<p><a id="ERR_CRYPTO_FIPS_FORCED"></a></p> | |
<h3>ERR_CRYPTO_FIPS_FORCED<span><a class="mark" href="#errors_err_crypto_fips_forced" id="errors_err_crypto_fips_forced">#</a></span><span><a class="mark" href="#ERR_CRYPTO_FIPS_FORCED" id="ERR_CRYPTO_FIPS_FORCED">#</a></span></h3> | |
-<p>The <a href="cli.html#cli_force_fips"><code>--force-fips</code></a> command-line argument was used but there was an attempt | |
+<p>The <a href="#cli_force_fips"><code>--force-fips</code></a> command-line argument was used but there was an attempt | |
to enable or disable FIPS mode in the <code>crypto</code> module.</p> | |
<p><a id="ERR_CRYPTO_FIPS_UNAVAILABLE"></a></p> | |
<h3>ERR_CRYPTO_FIPS_UNAVAILABLE<span><a class="mark" href="#errors_err_crypto_fips_unavailable" id="errors_err_crypto_fips_unavailable">#</a></span><span><a class="mark" href="#ERR_CRYPTO_FIPS_UNAVAILABLE" id="ERR_CRYPTO_FIPS_UNAVAILABLE">#</a></span></h3> | |
@@ -20404,31 +20367,31 @@ | |
available.</p> | |
<p><a id="ERR_CRYPTO_HASH_DIGEST_NO_UTF16"></a></p> | |
<h3>ERR_CRYPTO_HASH_DIGEST_NO_UTF16<span><a class="mark" href="#errors_err_crypto_hash_digest_no_utf16" id="errors_err_crypto_hash_digest_no_utf16">#</a></span><span><a class="mark" href="#ERR_CRYPTO_HASH_DIGEST_NO_UTF16" id="ERR_CRYPTO_HASH_DIGEST_NO_UTF16">#</a></span></h3> | |
-<p>The UTF-16 encoding was used with <a href="crypto.html#crypto_hash_digest_encoding"><code>hash.digest()</code></a>. While the | |
+<p>The UTF-16 encoding was used with <a href="#crypto_hash_digest_encoding"><code>hash.digest()</code></a>. While the | |
<code>hash.digest()</code> method does allow an <code>encoding</code> argument to be passed in, | |
causing the method to return a string rather than a <code>Buffer</code>, the UTF-16 | |
encoding (e.g. <code>ucs</code> or <code>utf16le</code>) is not supported.</p> | |
<p><a id="ERR_CRYPTO_HASH_FINALIZED"></a></p> | |
<h3>ERR_CRYPTO_HASH_FINALIZED<span><a class="mark" href="#errors_err_crypto_hash_finalized" id="errors_err_crypto_hash_finalized">#</a></span><span><a class="mark" href="#ERR_CRYPTO_HASH_FINALIZED" id="ERR_CRYPTO_HASH_FINALIZED">#</a></span></h3> | |
-<p><a href="crypto.html#crypto_hash_digest_encoding"><code>hash.digest()</code></a> was called multiple times. The <code>hash.digest()</code> method must | |
+<p><a href="#crypto_hash_digest_encoding"><code>hash.digest()</code></a> was called multiple times. The <code>hash.digest()</code> method must | |
be called no more than one time per instance of a <code>Hash</code> object.</p> | |
<p><a id="ERR_CRYPTO_HASH_UPDATE_FAILED"></a></p> | |
<h3>ERR_CRYPTO_HASH_UPDATE_FAILED<span><a class="mark" href="#errors_err_crypto_hash_update_failed" id="errors_err_crypto_hash_update_failed">#</a></span><span><a class="mark" href="#ERR_CRYPTO_HASH_UPDATE_FAILED" id="ERR_CRYPTO_HASH_UPDATE_FAILED">#</a></span></h3> | |
-<p><a href="crypto.html#crypto_hash_update_data_inputencoding"><code>hash.update()</code></a> failed for any reason. This should rarely, if ever, happen.</p> | |
+<p><a href="#crypto_hash_update_data_inputencoding"><code>hash.update()</code></a> failed for any reason. This should rarely, if ever, happen.</p> | |
<p><a id="ERR_CRYPTO_INVALID_DIGEST"></a></p> | |
<h3>ERR_CRYPTO_INVALID_DIGEST<span><a class="mark" href="#errors_err_crypto_invalid_digest" id="errors_err_crypto_invalid_digest">#</a></span><span><a class="mark" href="#ERR_CRYPTO_INVALID_DIGEST" id="ERR_CRYPTO_INVALID_DIGEST">#</a></span></h3> | |
-<p>An invalid <a href="crypto.html#crypto_crypto_gethashes">crypto digest algorithm</a> was specified.</p> | |
+<p>An invalid <a href="#crypto_crypto_gethashes">crypto digest algorithm</a> was specified.</p> | |
<p><a id="ERR_CRYPTO_INVALID_STATE"></a></p> | |
<h3>ERR_CRYPTO_INVALID_STATE<span><a class="mark" href="#errors_err_crypto_invalid_state" id="errors_err_crypto_invalid_state">#</a></span><span><a class="mark" href="#ERR_CRYPTO_INVALID_STATE" id="ERR_CRYPTO_INVALID_STATE">#</a></span></h3> | |
<p>A crypto method was used on an object that was in an invalid state. For | |
-instance, calling <a href="crypto.html#crypto_cipher_getauthtag"><code>cipher.getAuthTag()</code></a> before calling <code>cipher.final()</code>.</p> | |
+instance, calling <a href="#crypto_cipher_getauthtag"><code>cipher.getAuthTag()</code></a> before calling <code>cipher.final()</code>.</p> | |
<p><a id="ERR_CRYPTO_PBKDF2_ERROR"></a></p> | |
<h3>ERR_CRYPTO_PBKDF2_ERROR<span><a class="mark" href="#errors_err_crypto_pbkdf2_error" id="errors_err_crypto_pbkdf2_error">#</a></span><span><a class="mark" href="#ERR_CRYPTO_PBKDF2_ERROR" id="ERR_CRYPTO_PBKDF2_ERROR">#</a></span></h3> | |
<p>The PBKDF2 algorithm failed for unspecified reasons. OpenSSL does not provide | |
more details and therefore neither does Node.js.</p> | |
<p><a id="ERR_CRYPTO_SCRYPT_INVALID_PARAMETER"></a></p> | |
<h3>ERR_CRYPTO_SCRYPT_INVALID_PARAMETER<span><a class="mark" href="#errors_err_crypto_scrypt_invalid_parameter" id="errors_err_crypto_scrypt_invalid_parameter">#</a></span><span><a class="mark" href="#ERR_CRYPTO_SCRYPT_INVALID_PARAMETER" id="ERR_CRYPTO_SCRYPT_INVALID_PARAMETER">#</a></span></h3> | |
-<p>One or more <a href="crypto.html#crypto_crypto_scrypt_password_salt_keylen_options_callback"><code>crypto.scrypt()</code></a> or <a href="crypto.html#crypto_crypto_scryptSync_password_salt_keylen_options"><code>crypto.scryptSync()</code></a> parameters are | |
+<p>One or more <a href="#crypto_crypto_scrypt_password_salt_keylen_options_callback"><code>crypto.scrypt()</code></a> or <a href="#crypto_crypto_scryptSync_password_salt_keylen_options"><code>crypto.scryptSync()</code></a> parameters are | |
outside their legal range.</p> | |
<p><a id="ERR_CRYPTO_SCRYPT_NOT_SUPPORTED"></a></p> | |
<h3>ERR_CRYPTO_SCRYPT_NOT_SUPPORTED<span><a class="mark" href="#errors_err_crypto_scrypt_not_supported" id="errors_err_crypto_scrypt_not_supported">#</a></span><span><a class="mark" href="#ERR_CRYPTO_SCRYPT_NOT_SUPPORTED" id="ERR_CRYPTO_SCRYPT_NOT_SUPPORTED">#</a></span></h3> | |
@@ -20436,10 +20399,10 @@ | |
release binaries but can happen with custom builds, including distro builds.</p> | |
<p><a id="ERR_CRYPTO_SIGN_KEY_REQUIRED"></a></p> | |
<h3>ERR_CRYPTO_SIGN_KEY_REQUIRED<span><a class="mark" href="#errors_err_crypto_sign_key_required" id="errors_err_crypto_sign_key_required">#</a></span><span><a class="mark" href="#ERR_CRYPTO_SIGN_KEY_REQUIRED" id="ERR_CRYPTO_SIGN_KEY_REQUIRED">#</a></span></h3> | |
-<p>A signing <code>key</code> was not provided to the <a href="crypto.html#crypto_sign_sign_privatekey_outputformat"><code>sign.sign()</code></a> method.</p> | |
+<p>A signing <code>key</code> was not provided to the <a href="#crypto_sign_sign_privatekey_outputformat"><code>sign.sign()</code></a> method.</p> | |
<p><a id="ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH"></a></p> | |
<h3>ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH<span><a class="mark" href="#errors_err_crypto_timing_safe_equal_length" id="errors_err_crypto_timing_safe_equal_length">#</a></span><span><a class="mark" href="#ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH" id="ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH">#</a></span></h3> | |
-<p><a href="crypto.html#crypto_crypto_timingsafeequal_a_b"><code>crypto.timingSafeEqual()</code></a> was called with <code>Buffer</code>, <code>TypedArray</code>, or | |
+<p><a href="#crypto_crypto_timingsafeequal_a_b"><code>crypto.timingSafeEqual()</code></a> was called with <code>Buffer</code>, <code>TypedArray</code>, or | |
<code>DataView</code> arguments of different lengths.</p> | |
<p><a id="ERR_DNS_SET_SERVERS_FAILED"></a></p> | |
<h3>ERR_DNS_SET_SERVERS_FAILED<span><a class="mark" href="#errors_err_dns_set_servers_failed" id="errors_err_dns_set_servers_failed">#</a></span><span><a class="mark" href="#ERR_DNS_SET_SERVERS_FAILED" id="ERR_DNS_SET_SERVERS_FAILED">#</a></span></h3> | |
@@ -20448,11 +20411,11 @@ | |
<h3>ERR_DOMAIN_CALLBACK_NOT_AVAILABLE<span><a class="mark" href="#errors_err_domain_callback_not_available" id="errors_err_domain_callback_not_available">#</a></span><span><a class="mark" href="#ERR_DOMAIN_CALLBACK_NOT_AVAILABLE" id="ERR_DOMAIN_CALLBACK_NOT_AVAILABLE">#</a></span></h3> | |
<p>The <code>domain</code> module was not usable since it could not establish the required | |
error handling hooks, because | |
-<a href="process.html#process_process_setuncaughtexceptioncapturecallback_fn"><code>process.setUncaughtExceptionCaptureCallback()</code></a> had been called at an | |
+<a href="#process_process_setuncaughtexceptioncapturecallback_fn"><code>process.setUncaughtExceptionCaptureCallback()</code></a> had been called at an | |
earlier point in time.</p> | |
<p><a id="ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE"></a></p> | |
<h3>ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE<span><a class="mark" href="#errors_err_domain_cannot_set_uncaught_exception_capture" id="errors_err_domain_cannot_set_uncaught_exception_capture">#</a></span><span><a class="mark" href="#ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE" id="ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE">#</a></span></h3> | |
-<p><a href="process.html#process_process_setuncaughtexceptioncapturecallback_fn"><code>process.setUncaughtExceptionCaptureCallback()</code></a> could not be called | |
+<p><a href="#process_process_setuncaughtexceptioncapturecallback_fn"><code>process.setUncaughtExceptionCaptureCallback()</code></a> could not be called | |
because the <code>domain</code> module has been loaded at an earlier point in time.</p> | |
<p>The stack trace is extended to include the point in time at which the | |
<code>domain</code> module had been loaded.</p> | |
@@ -20463,7 +20426,7 @@ | |
<p><a id="ERR_ENCODING_NOT_SUPPORTED"></a></p> | |
<h3>ERR_ENCODING_NOT_SUPPORTED<span><a class="mark" href="#errors_err_encoding_not_supported" id="errors_err_encoding_not_supported">#</a></span><span><a class="mark" href="#ERR_ENCODING_NOT_SUPPORTED" id="ERR_ENCODING_NOT_SUPPORTED">#</a></span></h3> | |
<p>Encoding provided to <code>util.TextDecoder()</code> API was not one of the | |
-<a href="util.html#util_whatwg_supported_encodings">WHATWG Supported Encodings</a>.</p> | |
+<a href="#util_whatwg_supported_encodings">WHATWG Supported Encodings</a>.</p> | |
<p><a id="ERR_FALSY_VALUE_REJECTION"></a></p> | |
<h3>ERR_FALSY_VALUE_REJECTION<span><a class="mark" href="#errors_err_falsy_value_rejection" id="errors_err_falsy_value_rejection">#</a></span><span><a class="mark" href="#ERR_FALSY_VALUE_REJECTION" id="ERR_FALSY_VALUE_REJECTION">#</a></span></h3> | |
<p>A <code>Promise</code> that was callbackified via <code>util.callbackify()</code> was rejected with a | |
@@ -20474,8 +20437,8 @@ | |
allowed size for a <code>Buffer</code>.</p> | |
<p><a id="ERR_FS_INVALID_SYMLINK_TYPE"></a></p> | |
<h3>ERR_FS_INVALID_SYMLINK_TYPE<span><a class="mark" href="#errors_err_fs_invalid_symlink_type" id="errors_err_fs_invalid_symlink_type">#</a></span><span><a class="mark" href="#ERR_FS_INVALID_SYMLINK_TYPE" id="ERR_FS_INVALID_SYMLINK_TYPE">#</a></span></h3> | |
-<p>An invalid symlink type was passed to the <a href="fs.html#fs_fs_symlink_target_path_type_callback"><code>fs.symlink()</code></a> or | |
-<a href="fs.html#fs_fs_symlinksync_target_path_type"><code>fs.symlinkSync()</code></a> methods.</p> | |
+<p>An invalid symlink type was passed to the <a href="#fs_fs_symlink_target_path_type_callback"><code>fs.symlink()</code></a> or | |
+<a href="#fs_fs_symlinksync_target_path_type"><code>fs.symlinkSync()</code></a> methods.</p> | |
<p><a id="ERR_HTTP_HEADERS_SENT"></a></p> | |
<h3>ERR_HTTP_HEADERS_SENT<span><a class="mark" href="#errors_err_http_headers_sent" id="errors_err_http_headers_sent">#</a></span><span><a class="mark" href="#ERR_HTTP_HEADERS_SENT" id="ERR_HTTP_HEADERS_SENT">#</a></span></h3> | |
<p>An attempt was made to add more headers after the headers had already been sent.</p> | |
@@ -20704,7 +20667,7 @@ | |
<p><a id="ERR_INVALID_HANDLE_TYPE"></a></p> | |
<h3>ERR_INVALID_HANDLE_TYPE<span><a class="mark" href="#errors_err_invalid_handle_type" id="errors_err_invalid_handle_type">#</a></span><span><a class="mark" href="#ERR_INVALID_HANDLE_TYPE" id="ERR_INVALID_HANDLE_TYPE">#</a></span></h3> | |
<p>An attempt was made to send an unsupported "handle" over an IPC communication | |
-channel to a child process. See <a href="child_process.html#child_process_subprocess_send_message_sendhandle_options_callback"><code>subprocess.send()</code></a> and <a href="process.html#process_process_send_message_sendhandle_options_callback"><code>process.send()</code></a> for | |
+channel to a child process. See <a href="#child_process_subprocess_send_message_sendhandle_options_callback"><code>subprocess.send()</code></a> and <a href="#process_process_send_message_sendhandle_options_callback"><code>process.send()</code></a> for | |
more information.</p> | |
<p><a id="ERR_INVALID_HTTP_TOKEN"></a></p> | |
<h3>ERR_INVALID_HTTP_TOKEN<span><a class="mark" href="#errors_err_invalid_http_token" id="errors_err_invalid_http_token">#</a></span><span><a class="mark" href="#ERR_INVALID_HTTP_TOKEN" id="ERR_INVALID_HTTP_TOKEN">#</a></span></h3> | |
@@ -20762,8 +20725,8 @@ | |
<p>An invalid transfer object was passed to <code>postMessage()</code>.</p> | |
<p><a id="ERR_INVALID_TUPLE"></a></p> | |
<h3>ERR_INVALID_TUPLE<span><a class="mark" href="#errors_err_invalid_tuple" id="errors_err_invalid_tuple">#</a></span><span><a class="mark" href="#ERR_INVALID_TUPLE" id="ERR_INVALID_TUPLE">#</a></span></h3> | |
-<p>An element in the <code>iterable</code> provided to the <a href="url.html#url_the_whatwg_url_api">WHATWG</a> | |
-<a href="url.html#url_constructor_new_urlsearchparams_iterable"><code>URLSearchParams</code> constructor</a> did not | |
+<p>An element in the <code>iterable</code> provided to the <a href="#url_the_whatwg_url_api">WHATWG</a> | |
+<a href="#url_constructor_new_urlsearchparams_iterable"><code>URLSearchParams</code> constructor</a> did not | |
represent a <code>[name, value]</code> tuple – that is, if an element is not iterable, or | |
does not consist of exactly two elements.</p> | |
<p><a id="ERR_INVALID_URI"></a></p> | |
@@ -20771,14 +20734,14 @@ | |
<p>An invalid URI was passed.</p> | |
<p><a id="ERR_INVALID_URL"></a></p> | |
<h3>ERR_INVALID_URL<span><a class="mark" href="#errors_err_invalid_url" id="errors_err_invalid_url">#</a></span><span><a class="mark" href="#ERR_INVALID_URL" id="ERR_INVALID_URL">#</a></span></h3> | |
-<p>An invalid URL was passed to the <a href="url.html#url_the_whatwg_url_api">WHATWG</a> | |
-<a href="url.html#url_constructor_new_url_input_base"><code>URL</code> constructor</a> to be parsed. The thrown error object | |
+<p>An invalid URL was passed to the <a href="#url_the_whatwg_url_api">WHATWG</a> | |
+<a href="#url_constructor_new_url_input_base"><code>URL</code> constructor</a> to be parsed. The thrown error object | |
typically has an additional property <code>'input'</code> that contains the URL that failed | |
to parse.</p> | |
<p><a id="ERR_INVALID_URL_SCHEME"></a></p> | |
<h3>ERR_INVALID_URL_SCHEME<span><a class="mark" href="#errors_err_invalid_url_scheme" id="errors_err_invalid_url_scheme">#</a></span><span><a class="mark" href="#ERR_INVALID_URL_SCHEME" id="ERR_INVALID_URL_SCHEME">#</a></span></h3> | |
<p>An attempt was made to use a URL of an incompatible scheme (protocol) for a | |
-specific purpose. It is only used in the <a href="url.html#url_the_whatwg_url_api">WHATWG URL API</a> support in the | |
+specific purpose. It is only used in the <a href="#url_the_whatwg_url_api">WHATWG URL API</a> support in the | |
<a href="fs.html"><code>fs</code></a> module (which only accepts URLs with <code>'file'</code> scheme), but may be used | |
in other Node.js APIs as well in the future.</p> | |
<p><a id="ERR_IPC_CHANNEL_CLOSED"></a></p> | |
@@ -20819,7 +20782,7 @@ | |
but not provided in the <code>transferList</code> for that call.</p> | |
<p><a id="ERR_MISSING_MODULE"></a></p> | |
<h3>ERR_MISSING_MODULE<span><a class="mark" href="#errors_err_missing_module" id="errors_err_missing_module">#</a></span><span><a class="mark" href="#ERR_MISSING_MODULE" id="ERR_MISSING_MODULE">#</a></span></h3> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>An <a href="esm.html">ES6 module</a> could not be resolved.</p> | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>An <a href="esm.html">ES6 module</a> could not be resolved.</p> | |
<p><a id="ERR_MISSING_PLATFORM_FOR_WORKER"></a></p> | |
<h3>ERR_MISSING_PLATFORM_FOR_WORKER<span><a class="mark" href="#errors_err_missing_platform_for_worker" id="errors_err_missing_platform_for_worker">#</a></span><span><a class="mark" href="#ERR_MISSING_PLATFORM_FOR_WORKER" id="ERR_MISSING_PLATFORM_FOR_WORKER">#</a></span></h3> | |
<p>The V8 platform used by this instance of Node.js does not support creating | |
@@ -20827,7 +20790,7 @@ | |
this error will not occur with standard builds of Node.js.</p> | |
<p><a id="ERR_MODULE_RESOLUTION_LEGACY"></a></p> | |
<h3>ERR_MODULE_RESOLUTION_LEGACY<span><a class="mark" href="#errors_err_module_resolution_legacy" id="errors_err_module_resolution_legacy">#</a></span><span><a class="mark" href="#ERR_MODULE_RESOLUTION_LEGACY" id="ERR_MODULE_RESOLUTION_LEGACY">#</a></span></h3> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>A failure occurred resolving imports in an <a href="esm.html">ES6 module</a>.</p> | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>A failure occurred resolving imports in an <a href="esm.html">ES6 module</a>.</p> | |
<p><a id="ERR_MULTIPLE_CALLBACK"></a></p> | |
<h3>ERR_MULTIPLE_CALLBACK<span><a class="mark" href="#errors_err_multiple_callback" id="errors_err_multiple_callback">#</a></span><span><a class="mark" href="#ERR_MULTIPLE_CALLBACK" id="ERR_MULTIPLE_CALLBACK">#</a></span></h3> | |
<p>A callback was called more than once.</p> | |
@@ -20872,7 +20835,7 @@ | |
OpenSSL crypto support.</p> | |
<p><a id="ERR_NO_ICU"></a></p> | |
<h3>ERR_NO_ICU<span><a class="mark" href="#errors_err_no_icu" id="errors_err_no_icu">#</a></span><span><a class="mark" href="#ERR_NO_ICU" id="ERR_NO_ICU">#</a></span></h3> | |
-<p>An attempt was made to use features that require <a href="intl.html#intl_options_for_building_node_js">ICU</a>, but Node.js was not | |
+<p>An attempt was made to use features that require <a href="#intl_internationalization_support">ICU</a>, but Node.js was not | |
compiled with ICU support.</p> | |
<p><a id="ERR_NO_LONGER_SUPPORTED"></a></p> | |
<h3>ERR_NO_LONGER_SUPPORTED<span><a class="mark" href="#errors_err_no_longer_supported" id="errors_err_no_longer_supported">#</a></span><span><a class="mark" href="#ERR_NO_LONGER_SUPPORTED" id="ERR_NO_LONGER_SUPPORTED">#</a></span></h3> | |
@@ -20883,7 +20846,7 @@ | |
<p>A given value is out of the accepted range.</p> | |
<p><a id="ERR_REQUIRE_ESM"></a></p> | |
<h3>ERR_REQUIRE_ESM<span><a class="mark" href="#errors_err_require_esm" id="errors_err_require_esm">#</a></span><span><a class="mark" href="#ERR_REQUIRE_ESM" id="ERR_REQUIRE_ESM">#</a></span></h3> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>An attempt was made to <code>require()</code> an <a href="esm.html">ES6 module</a>.</p> | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>An attempt was made to <code>require()</code> an <a href="esm.html">ES6 module</a>.</p> | |
<p><a id="ERR_SCRIPT_EXECUTION_INTERRUPTED"></a></p> | |
<h3>ERR_SCRIPT_EXECUTION_INTERRUPTED<span><a class="mark" href="#errors_err_script_execution_interrupted" id="errors_err_script_execution_interrupted">#</a></span><span><a class="mark" href="#ERR_SCRIPT_EXECUTION_INTERRUPTED" id="ERR_SCRIPT_EXECUTION_INTERRUPTED">#</a></span></h3> | |
<p>Script execution was interrupted by <code>SIGINT</code> (For example, when Ctrl+C was | |
@@ -20893,7 +20856,7 @@ | |
<p>Script execution timed out, possibly due to bugs in the script being executed.</p> | |
<p><a id="ERR_SERVER_ALREADY_LISTEN"></a></p> | |
<h3>ERR_SERVER_ALREADY_LISTEN<span><a class="mark" href="#errors_err_server_already_listen" id="errors_err_server_already_listen">#</a></span><span><a class="mark" href="#ERR_SERVER_ALREADY_LISTEN" id="ERR_SERVER_ALREADY_LISTEN">#</a></span></h3> | |
-<p>The <a href="net.html#net_server_listen"><code>server.listen()</code></a> method was called while a <code>net.Server</code> was already | |
+<p>The <a href="#net_server_listen"><code>server.listen()</code></a> method was called while a <code>net.Server</code> was already | |
listening. This applies to all instances of <code>net.Server</code>, including HTTP, HTTPS, | |
and HTTP/2 <code>Server</code> instances.</p> | |
<p><a id="ERR_SERVER_NOT_RUNNING"></a></p> | |
@@ -20945,22 +20908,22 @@ | |
destroyed using <code>stream.destroy()</code>.</p> | |
<p><a id="ERR_STREAM_NULL_VALUES"></a></p> | |
<h3>ERR_STREAM_NULL_VALUES<span><a class="mark" href="#errors_err_stream_null_values" id="errors_err_stream_null_values">#</a></span><span><a class="mark" href="#ERR_STREAM_NULL_VALUES" id="ERR_STREAM_NULL_VALUES">#</a></span></h3> | |
-<p>An attempt was made to call <a href="stream.html#stream_writable_write_chunk_encoding_callback"><code>stream.write()</code></a> with a <code>null</code> chunk.</p> | |
+<p>An attempt was made to call <a href="#stream_writable_write_chunk_encoding_callback"><code>stream.write()</code></a> with a <code>null</code> chunk.</p> | |
<p><a id="ERR_STREAM_PREMATURE_CLOSE"></a></p> | |
<h3>ERR_STREAM_PREMATURE_CLOSE<span><a class="mark" href="#errors_err_stream_premature_close" id="errors_err_stream_premature_close">#</a></span><span><a class="mark" href="#ERR_STREAM_PREMATURE_CLOSE" id="ERR_STREAM_PREMATURE_CLOSE">#</a></span></h3> | |
<p>An error returned by <code>stream.finished()</code> and <code>stream.pipeline()</code>, when a stream | |
or a pipeline ends non gracefully with no explicit error.</p> | |
<p><a id="ERR_STREAM_PUSH_AFTER_EOF"></a></p> | |
<h3>ERR_STREAM_PUSH_AFTER_EOF<span><a class="mark" href="#errors_err_stream_push_after_eof" id="errors_err_stream_push_after_eof">#</a></span><span><a class="mark" href="#ERR_STREAM_PUSH_AFTER_EOF" id="ERR_STREAM_PUSH_AFTER_EOF">#</a></span></h3> | |
-<p>An attempt was made to call <a href="stream.html#stream_readable_push_chunk_encoding"><code>stream.push()</code></a> after a <code>null</code>(EOF) had been | |
+<p>An attempt was made to call <a href="#stream_readable_push_chunk_encoding"><code>stream.push()</code></a> after a <code>null</code>(EOF) had been | |
pushed to the stream.</p> | |
<p><a id="ERR_STREAM_READ_NOT_IMPLEMENTED"></a></p> | |
<h3>ERR_STREAM_READ_NOT_IMPLEMENTED<span><a class="mark" href="#errors_err_stream_read_not_implemented" id="errors_err_stream_read_not_implemented">#</a></span><span><a class="mark" href="#ERR_STREAM_READ_NOT_IMPLEMENTED" id="ERR_STREAM_READ_NOT_IMPLEMENTED">#</a></span></h3> | |
<p>An attempt was made to use a readable stream that did not implement | |
-<a href="stream.html#stream_readable_read_size_1"><code>readable._read()</code></a>.</p> | |
+<a href="#stream_readable_read_size_1"><code>readable._read()</code></a>.</p> | |
<p><a id="ERR_STREAM_UNSHIFT_AFTER_END_EVENT"></a></p> | |
<h3>ERR_STREAM_UNSHIFT_AFTER_END_EVENT<span><a class="mark" href="#errors_err_stream_unshift_after_end_event" id="errors_err_stream_unshift_after_end_event">#</a></span><span><a class="mark" href="#ERR_STREAM_UNSHIFT_AFTER_END_EVENT" id="ERR_STREAM_UNSHIFT_AFTER_END_EVENT">#</a></span></h3> | |
-<p>An attempt was made to call <a href="stream.html#stream_readable_unshift_chunk"><code>stream.unshift()</code></a> after the <code>'end'</code> event was | |
+<p>An attempt was made to call <a href="#stream_readable_unshift_chunk"><code>stream.unshift()</code></a> after the <code>'end'</code> event was | |
emitted.</p> | |
<p><a id="ERR_STREAM_WRAP"></a></p> | |
<h3>ERR_STREAM_WRAP<span><a class="mark" href="#errors_err_stream_wrap" id="errors_err_stream_wrap">#</a></span><span><a class="mark" href="#ERR_STREAM_WRAP" id="ERR_STREAM_WRAP">#</a></span></h3> | |
@@ -20974,7 +20937,7 @@ | |
</code></pre> | |
<p><a id="ERR_STREAM_WRITE_AFTER_END"></a></p> | |
<h3>ERR_STREAM_WRITE_AFTER_END<span><a class="mark" href="#errors_err_stream_write_after_end" id="errors_err_stream_write_after_end">#</a></span><span><a class="mark" href="#ERR_STREAM_WRITE_AFTER_END" id="ERR_STREAM_WRITE_AFTER_END">#</a></span></h3> | |
-<p>An attempt was made to call <a href="stream.html#stream_writable_write_chunk_encoding_callback"><code>stream.write()</code></a> after <code>stream.end()</code> has been | |
+<p>An attempt was made to call <a href="#stream_writable_write_chunk_encoding_callback"><code>stream.write()</code></a> after <code>stream.end()</code> has been | |
called.</p> | |
<p><a id="ERR_STRING_TOO_LONG"></a></p> | |
<h3>ERR_STRING_TOO_LONG<span><a class="mark" href="#errors_err_string_too_long" id="errors_err_string_too_long">#</a></span><span><a class="mark" href="#ERR_STRING_TOO_LONG" id="ERR_STRING_TOO_LONG">#</a></span></h3> | |
@@ -21033,7 +20996,7 @@ | |
<p>The initialization of a TTY failed due to a system error.</p> | |
<p><a id="ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET"></a></p> | |
<h3>ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET<span><a class="mark" href="#errors_err_uncaught_exception_capture_already_set" id="errors_err_uncaught_exception_capture_already_set">#</a></span><span><a class="mark" href="#ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET" id="ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET">#</a></span></h3> | |
-<p><a href="process.html#process_process_setuncaughtexceptioncapturecallback_fn"><code>process.setUncaughtExceptionCaptureCallback()</code></a> was called twice, | |
+<p><a href="#process_process_setuncaughtexceptioncapturecallback_fn"><code>process.setUncaughtExceptionCaptureCallback()</code></a> was called twice, | |
without first resetting the callback to <code>null</code>.</p> | |
<p>This error is designed to prevent accidentally overwriting a callback registered | |
from another module.</p> | |
@@ -21043,7 +21006,7 @@ | |
<p><a id="ERR_UNHANDLED_ERROR"></a></p> | |
<h3>ERR_UNHANDLED_ERROR<span><a class="mark" href="#errors_err_unhandled_error" id="errors_err_unhandled_error">#</a></span><span><a class="mark" href="#ERR_UNHANDLED_ERROR" id="ERR_UNHANDLED_ERROR">#</a></span></h3> | |
<p>An unhandled error occurred (for instance, when an <code>'error'</code> event is emitted | |
-by an <a href="events.html"><code>EventEmitter</code></a> but an <code>'error'</code> handler is not registered).</p> | |
+by an <a href="#events_class_eventemitter"><code>EventEmitter</code></a> but an <code>'error'</code> handler is not registered).</p> | |
<p><a id="ERR_UNKNOWN_BUILTIN_MODULE"></a></p> | |
<h3>ERR_UNKNOWN_BUILTIN_MODULE<span><a class="mark" href="#errors_err_unknown_builtin_module" id="errors_err_unknown_builtin_module">#</a></span><span><a class="mark" href="#ERR_UNKNOWN_BUILTIN_MODULE" id="ERR_UNKNOWN_BUILTIN_MODULE">#</a></span></h3> | |
<p>Used to identify a specific kind of internal Node.js error that should not | |
@@ -21057,15 +21020,15 @@ | |
<p>An invalid or unknown encoding option was passed to an API.</p> | |
<p><a id="ERR_UNKNOWN_FILE_EXTENSION"></a></p> | |
<h3>ERR_UNKNOWN_FILE_EXTENSION<span><a class="mark" href="#errors_err_unknown_file_extension" id="errors_err_unknown_file_extension">#</a></span><span><a class="mark" href="#ERR_UNKNOWN_FILE_EXTENSION" id="ERR_UNKNOWN_FILE_EXTENSION">#</a></span></h3> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>An attempt was made to load a module with an unknown or unsupported file | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>An attempt was made to load a module with an unknown or unsupported file | |
extension.</p> | |
<p><a id="ERR_UNKNOWN_MODULE_FORMAT"></a></p> | |
<h3>ERR_UNKNOWN_MODULE_FORMAT<span><a class="mark" href="#errors_err_unknown_module_format" id="errors_err_unknown_module_format">#</a></span><span><a class="mark" href="#ERR_UNKNOWN_MODULE_FORMAT" id="ERR_UNKNOWN_MODULE_FORMAT">#</a></span></h3> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>An attempt was made to load a module with an unknown or unsupported format.</p> | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>An attempt was made to load a module with an unknown or unsupported format.</p> | |
<p><a id="ERR_UNKNOWN_SIGNAL"></a></p> | |
<h3>ERR_UNKNOWN_SIGNAL<span><a class="mark" href="#errors_err_unknown_signal" id="errors_err_unknown_signal">#</a></span><span><a class="mark" href="#ERR_UNKNOWN_SIGNAL" id="ERR_UNKNOWN_SIGNAL">#</a></span></h3> | |
<p>An invalid or unknown process signal was passed to an API expecting a valid | |
-signal (such as <a href="child_process.html#child_process_subprocess_kill_signal"><code>subprocess.kill()</code></a>).</p> | |
+signal (such as <a href="#child_process_subprocess_kill_signal"><code>subprocess.kill()</code></a>).</p> | |
<p><a id="ERR_UNKNOWN_STDIN_TYPE"></a></p> | |
<h3>ERR_UNKNOWN_STDIN_TYPE<span><a class="mark" href="#errors_err_unknown_stdin_type" id="errors_err_unknown_stdin_type">#</a></span><span><a class="mark" href="#ERR_UNKNOWN_STDIN_TYPE" id="ERR_UNKNOWN_STDIN_TYPE">#</a></span></h3> | |
<p>An attempt was made to launch a Node.js process with an unknown <code>stdin</code> file | |
@@ -21126,17 +21089,15 @@ | |
<p><a id="ERR_ZLIB_INITIALIZATION_FAILED"></a></p> | |
<h3>ERR_ZLIB_INITIALIZATION_FAILED<span><a class="mark" href="#errors_err_zlib_initialization_failed" id="errors_err_zlib_initialization_failed">#</a></span><span><a class="mark" href="#ERR_ZLIB_INITIALIZATION_FAILED" id="ERR_ZLIB_INITIALIZATION_FAILED">#</a></span></h3> | |
<p>Creation of a <a href="zlib.html"><code>zlib</code></a> object failed due to incorrect configuration.</p> | |
-<!-- [end-include:errors.md] --> | |
-<!-- [start-include:events.md] --> | |
<h1>Events<span><a class="mark" href="#events_events" id="events_events">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><!--type=module--> | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><!--type=module--> | |
<p>Much of the Node.js core API is built around an idiomatic asynchronous | |
event-driven architecture in which certain kinds of objects (called "emitters") | |
emit named events that cause <code>Function</code> objects ("listeners") to be called.</p> | |
-<p>For instance: a <a href="net.html#net_class_net_server"><code>net.Server</code></a> object emits an event each time a peer | |
-connects to it; a <a href="fs.html#fs_class_fs_readstream"><code>fs.ReadStream</code></a> emits an event when the file is opened; | |
-a <a href="stream.html#stream_stream">stream</a> emits an event whenever data is available to be read.</p> | |
+<p>For instance: a <a href="#net_class_net_server"><code>net.Server</code></a> object emits an event each time a peer | |
+connects to it; a <a href="#fs_class_fs_readstream"><code>fs.ReadStream</code></a> emits an event when the file is opened; | |
+a <a href="stream.html">stream</a> emits an event whenever data is available to be read.</p> | |
<p>All objects that emit events are instances of the <code>EventEmitter</code> class. These | |
objects expose an <code>eventEmitter.on()</code> function that allows one or more | |
functions to be attached to named events emitted by the object. Typically, | |
@@ -21308,7 +21269,7 @@ | |
<h3>EventEmitter.listenerCount(emitter, eventName)<span><a class="mark" href="#events_eventemitter_listenercount_emitter_eventname" id="events_eventemitter_listenercount_emitter_eventname">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.9.12</span><span>Deprecated since: v4.0.0</span> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#events_emitter_listenercount_eventname"><code>emitter.listenerCount()</code></a> instead.</div><p>A class method that returns the number of listeners for the given <code>eventName</code> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#events_emitter_listenercount_eventname"><code>emitter.listenerCount()</code></a> instead.</div><p>A class method that returns the number of listeners for the given <code>eventName</code> | |
registered on the given <code>emitter</code>.</p> | |
<pre><code class="lang-js">const myEmitter = new MyEmitter(); | |
myEmitter.on('event', () => {}); | |
@@ -21340,9 +21301,9 @@ | |
emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); | |
}); | |
</code></pre> | |
-<p>The <a href="cli.html#cli_trace_warnings"><code>--trace-warnings</code></a> command line flag can be used to display the | |
+<p>The <a href="#cli_trace_warnings"><code>--trace-warnings</code></a> command line flag can be used to display the | |
stack trace for such warnings.</p> | |
-<p>The emitted warning can be inspected with <a href="process.html#process_event_warning"><code>process.on('warning')</code></a> and will | |
+<p>The emitted warning can be inspected with <a href="#process_event_warning"><code>process.on('warning')</code></a> and will | |
have the additional <code>emitter</code>, <code>type</code> and <code>count</code> properties, referring to | |
the event emitter instance, the event’s name and the number of attached | |
listeners, respectively. | |
@@ -21433,7 +21394,7 @@ | |
</div><ul> | |
<li><code>eventName</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Symbol_type" class="type"><symbol></a></li> | |
<li><code>listener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
-<li>Returns: <a href="events.html#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
+<li>Returns: <a href="#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
</ul> | |
<p>Alias for <a href="#events_emitter_removelistener_eventname_listener"><code>emitter.removeListener()</code></a>.</p> | |
<h3>emitter.on(eventName, listener)<span><a class="mark" href="#events_emitter_on_eventname_listener" id="events_emitter_on_eventname_listener">#</a></span></h3> | |
@@ -21442,7 +21403,7 @@ | |
</div><ul> | |
<li><code>eventName</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Symbol_type" class="type"><symbol></a> The name of the event.</li> | |
<li><code>listener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> The callback function</li> | |
-<li>Returns: <a href="events.html#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
+<li>Returns: <a href="#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
</ul> | |
<p>Adds the <code>listener</code> function to the end of the listeners array for the | |
event named <code>eventName</code>. No checks are made to see if the <code>listener</code> has | |
@@ -21471,7 +21432,7 @@ | |
</div><ul> | |
<li><code>eventName</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Symbol_type" class="type"><symbol></a> The name of the event.</li> | |
<li><code>listener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> The callback function</li> | |
-<li>Returns: <a href="events.html#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
+<li>Returns: <a href="#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
</ul> | |
<p>Adds a <strong>one-time</strong> <code>listener</code> function for the event named <code>eventName</code>. The | |
next time <code>eventName</code> is triggered, this listener is removed and then invoked.</p> | |
@@ -21497,7 +21458,7 @@ | |
</div><ul> | |
<li><code>eventName</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Symbol_type" class="type"><symbol></a> The name of the event.</li> | |
<li><code>listener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> The callback function</li> | |
-<li>Returns: <a href="events.html#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
+<li>Returns: <a href="#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
</ul> | |
<p>Adds the <code>listener</code> function to the <em>beginning</em> of the listeners array for the | |
event named <code>eventName</code>. No checks are made to see if the <code>listener</code> has | |
@@ -21515,7 +21476,7 @@ | |
</div><ul> | |
<li><code>eventName</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Symbol_type" class="type"><symbol></a> The name of the event.</li> | |
<li><code>listener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> The callback function</li> | |
-<li>Returns: <a href="events.html#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
+<li>Returns: <a href="#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
</ul> | |
<p>Adds a <strong>one-time</strong> <code>listener</code> function for the event named <code>eventName</code> to the | |
<em>beginning</em> of the listeners array. The next time <code>eventName</code> is triggered, this | |
@@ -21530,7 +21491,7 @@ | |
<span>Added in: v0.1.26</span> | |
</div><ul> | |
<li><code>eventName</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Symbol_type" class="type"><symbol></a></li> | |
-<li>Returns: <a href="events.html#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
+<li>Returns: <a href="#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
</ul> | |
<p>Removes all listeners, or those of the specified <code>eventName</code>.</p> | |
<p>Note that it is bad practice to remove listeners added elsewhere in the code, | |
@@ -21543,7 +21504,7 @@ | |
</div><ul> | |
<li><code>eventName</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Symbol_type" class="type"><symbol></a></li> | |
<li><code>listener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
-<li>Returns: <a href="events.html#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
+<li>Returns: <a href="#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
</ul> | |
<p>Removes the specified <code>listener</code> from the listener array for the event named | |
<code>eventName</code>.</p> | |
@@ -21602,7 +21563,7 @@ | |
<span>Added in: v0.3.5</span> | |
</div><ul> | |
<li><code>n</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
-<li>Returns: <a href="events.html#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
+<li>Returns: <a href="#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
</ul> | |
<p>By default <code>EventEmitter</code>s will print a warning if more than <code>10</code> listeners are | |
added for a particular event. This is a useful default that helps finding | |
@@ -21642,11 +21603,9 @@ | |
newListeners[0](); | |
emitter.emit('log'); | |
</code></pre> | |
-<!-- [end-include:events.md] --> | |
-<!-- [start-include:fs.md] --> | |
<h1>File System<span><a class="mark" href="#fs_file_system" id="fs_file_system">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><!--name=fs--> | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><!--name=fs--> | |
<p>The <code>fs</code> module provides an API for interacting with the file system in a | |
manner closely modeled around standard POSIX functions.</p> | |
<p>To use this module:</p> | |
@@ -21721,7 +21680,7 @@ | |
</code></pre> | |
<h2>File paths<span><a class="mark" href="#fs_file_paths" id="fs_file_paths">#</a></span></h2> | |
<p>Most <code>fs</code> operations accept filepaths that may be specified in the form of | |
-a string, a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>, or a <a href="url.html#url_class_url"><code>URL</code></a> object using the <code>file:</code> protocol.</p> | |
+a string, a <a href="#buffer_buffer"><code>Buffer</code></a>, or a <a href="#url_the_whatwg_url_api"><code>URL</code></a> object using the <code>file:</code> protocol.</p> | |
<p>String form paths are interpreted as UTF-8 character sequences identifying | |
the absolute or relative filename. Relative paths will be resolved relative | |
to the current working directory as specified by <code>process.cwd()</code>.</p> | |
@@ -21743,7 +21702,7 @@ | |
}); | |
}); | |
</code></pre> | |
-<p>Paths specified using a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a> are useful primarily on certain POSIX | |
+<p>Paths specified using a <a href="#buffer_buffer"><code>Buffer</code></a> are useful primarily on certain POSIX | |
operating systems that treat file paths as opaque byte sequences. On such | |
systems, it is possible for a single file path to contain sub-sequences that | |
use multiple character encodings. As with string paths, <code>Buffer</code> paths may | |
@@ -21765,7 +21724,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v7.6.0</span> | |
</div><p>For most <code>fs</code> module functions, the <code>path</code> or <code>filename</code> argument may be passed | |
-as a WHATWG <a href="url.html#url_class_url"><code>URL</code></a> object. Only <a href="url.html#url_class_url"><code>URL</code></a> objects using the <code>file:</code> protocol | |
+as a WHATWG <a href="#url_the_whatwg_url_api"><code>URL</code></a> object. Only <a href="#url_the_whatwg_url_api"><code>URL</code></a> objects using the <code>file:</code> protocol | |
are supported.</p> | |
<pre><code class="lang-js">const fs = require('fs'); | |
const fileUrl = new URL('file:///tmp/hello'); | |
@@ -21773,7 +21732,7 @@ | |
fs.readFileSync(fileUrl); | |
</code></pre> | |
<p><code>file:</code> URLs are always absolute paths.</p> | |
-<p>Using WHATWG <a href="url.html#url_class_url"><code>URL</code></a> objects might introduce platform-specific behaviors.</p> | |
+<p>Using WHATWG <a href="#url_the_whatwg_url_api"><code>URL</code></a> objects might introduce platform-specific behaviors.</p> | |
<p>On Windows, <code>file:</code> URLs with a hostname convert to UNC paths, while <code>file:</code> | |
URLs with drive letters convert to local absolute paths. <code>file:</code> URLs without a | |
hostname nor a drive letter will result in a throw:</p> | |
@@ -21861,7 +21820,7 @@ | |
<p>Note that all file system APIs except <code>fs.FSWatcher()</code> and those that are | |
explicitly synchronous use libuv's threadpool, which can have surprising and | |
negative performance implications for some applications, see the | |
-<a href="cli.html#cli_uv_threadpool_size_size"><code>UV_THREADPOOL_SIZE</code></a> documentation for more information.</p> | |
+<a href="#cli_uv_threadpool_size_size"><code>UV_THREADPOOL_SIZE</code></a> documentation for more information.</p> | |
<h2>Class: fs.FSWatcher<span><a class="mark" href="#fs_class_fs_fswatcher" id="fs_class_fs_fswatcher">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.5.8</span> | |
@@ -21874,7 +21833,7 @@ | |
<span>Added in: v0.5.8</span> | |
</div><ul> | |
<li><code>eventType</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The type of change event that has occurred</li> | |
-<li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> The filename that changed (if relevant/available)</li> | |
+<li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> The filename that changed (if relevant/available)</li> | |
</ul> | |
<p>Emitted when something changes in a watched directory or file. | |
See more details in <a href="#fs_fs_watch_filename_options_listener"><code>fs.watch()</code></a>.</p> | |
@@ -21913,7 +21872,7 @@ | |
<span>Added in: v0.1.93</span> | |
</div><p>A successful call to <code>fs.createReadStream()</code> will return a new <code>fs.ReadStream</code> | |
object.</p> | |
-<p>All <code>fs.ReadStream</code> objects are <a href="stream.html#stream_class_stream_readable">Readable Streams</a>.</p> | |
+<p>All <code>fs.ReadStream</code> objects are <a href="#stream_class_stream_readable">Readable Streams</a>.</p> | |
<h3>Event: 'close'<span><a class="mark" href="#fs_event_close_1" id="fs_event_close_1">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.93</span> | |
@@ -21941,7 +21900,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.93</span> | |
</div><ul> | |
-<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
<p>The path to the file the stream is reading from as specified in the first | |
argument to <code>fs.createReadStream()</code>. If <code>path</code> is passed as a string, then | |
@@ -22200,7 +22159,7 @@ | |
<h2>Class: fs.WriteStream<span><a class="mark" href="#fs_class_fs_writestream" id="fs_class_fs_writestream">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.93</span> | |
-</div><p><code>WriteStream</code> is a <a href="stream.html#stream_writable_streams">Writable Stream</a>.</p> | |
+</div><p><code>WriteStream</code> is a <a href="#stream_class_stream_writable">Writable Stream</a>.</p> | |
<h3>Event: 'close'<span><a class="mark" href="#fs_event_close_2" id="fs_event_close_2">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.93</span> | |
@@ -22246,7 +22205,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>fs.constants.F_OK</code></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
@@ -22372,7 +22331,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>fs.constants.F_OK</code></li> | |
</ul> | |
<p>Synchronously tests a user's permissions for the file or directory specified | |
@@ -22413,8 +22372,8 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> filename or file descriptor</li> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> filename or file descriptor</li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>0o666</code></li> | |
@@ -22427,7 +22386,7 @@ | |
</li> | |
</ul> | |
<p>Asynchronously append data to a file, creating the file if it does not yet | |
-exist. <code>data</code> can be a string or a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>.</p> | |
+exist. <code>data</code> can be a string or a <a href="#buffer_buffer"><code>Buffer</code></a>.</p> | |
<p>Example:</p> | |
<pre><code class="lang-js">fs.appendFile('message.txt', 'data to append', (err) => { | |
if (err) throw err; | |
@@ -22467,8 +22426,8 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> filename or file descriptor</li> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> filename or file descriptor</li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>0o666</code></li> | |
@@ -22477,7 +22436,7 @@ | |
</li> | |
</ul> | |
<p>Synchronously append data to a file, creating the file if it does not yet | |
-exist. <code>data</code> can be a string or a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>.</p> | |
+exist. <code>data</code> can be a string or a <a href="#buffer_buffer"><code>Buffer</code></a>.</p> | |
<p>Example:</p> | |
<pre><code class="lang-js">try { | |
fs.appendFileSync('message.txt', 'data to append'); | |
@@ -22524,7 +22483,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
@@ -22669,7 +22628,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
</ul> | |
<p>Synchronously changes the permissions of a file. Returns <code>undefined</code>. | |
@@ -22695,7 +22654,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>uid</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>gid</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
@@ -22720,7 +22679,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>uid</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>gid</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
</ul> | |
@@ -22770,8 +22729,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.5.0</span> | |
</div><ul> | |
-<li><code>src</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> source filename to copy</li> | |
-<li><code>dest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> destination filename of the copy operation</li> | |
+<li><code>src</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> source filename to copy</li> | |
+<li><code>dest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> destination filename of the copy operation</li> | |
<li><code>flags</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> modifiers for copy operation. <strong>Default:</strong> <code>0</code>.</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
</ul> | |
@@ -22815,8 +22774,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.5.0</span> | |
</div><ul> | |
-<li><code>src</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> source filename to copy</li> | |
-<li><code>dest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> destination filename of the copy operation</li> | |
+<li><code>src</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> source filename to copy</li> | |
+<li><code>dest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> destination filename of the copy operation</li> | |
<li><code>flags</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> modifiers for copy operation. <strong>Default:</strong> <code>0</code>.</li> | |
</ul> | |
<p>Synchronously copies <code>src</code> to <code>dest</code>. By default, <code>dest</code> is overwritten if it | |
@@ -22875,7 +22834,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>flags</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> See <a href="#fs_file_system_flags">support of file system <code>flags</code></a>. <strong>Default:</strong> | |
<code>'r'</code>.</li> | |
@@ -22888,7 +22847,7 @@ | |
<li><code>highWaterMark</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>64 * 1024</code></li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="fs.html#fs_class_fs_readstream" class="type"><fs.ReadStream></a> See <a href="stream.html#stream_class_stream_readable">Readable Streams</a>.</li> | |
+<li>Returns: <a href="#fs_class_fs_readstream" class="type"><fs.ReadStream></a> See <a href="#stream_class_stream_readable">Readable Streams</a>.</li> | |
</ul> | |
<p>Unlike the 16 kb default <code>highWaterMark</code> for a readable stream, the stream | |
returned by this method has a default <code>highWaterMark</code> of 64 kb.</p> | |
@@ -22896,11 +22855,11 @@ | |
the file instead of the entire file. Both <code>start</code> and <code>end</code> are inclusive and | |
start counting at 0. If <code>fd</code> is specified and <code>start</code> is omitted or <code>undefined</code>, | |
<code>fs.createReadStream()</code> reads sequentially from the current file position. | |
-The <code>encoding</code> can be any one of those accepted by <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>.</p> | |
+The <code>encoding</code> can be any one of those accepted by <a href="#buffer_buffer"><code>Buffer</code></a>.</p> | |
<p>If <code>fd</code> is specified, <code>ReadStream</code> will ignore the <code>path</code> argument and will use | |
the specified file descriptor. This means that no <code>'open'</code> event will be | |
emitted. Note that <code>fd</code> should be blocking; non-blocking <code>fd</code>s should be passed | |
-to <a href="net.html#net_class_net_socket"><code>net.Socket</code></a>.</p> | |
+to <a href="#net_class_net_socket"><code>net.Socket</code></a>.</p> | |
<p>If <code>autoClose</code> is false, then the file descriptor won't be closed, even if | |
there's an error. It is the application's responsibility to close it and make | |
sure there's no file descriptor leak. If <code>autoClose</code> is set to true (default | |
@@ -22935,7 +22894,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>flags</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> See <a href="#fs_file_system_flags">support of file system <code>flags</code></a>. <strong>Default:</strong> | |
<code>'w'</code>.</li> | |
@@ -22946,13 +22905,13 @@ | |
<li><code>start</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="fs.html#fs_class_fs_writestream" class="type"><fs.WriteStream></a> See <a href="stream.html#stream_writable_streams">Writable Stream</a>.</li> | |
+<li>Returns: <a href="#fs_class_fs_writestream" class="type"><fs.WriteStream></a> See <a href="#stream_class_stream_writable">Writable Stream</a>.</li> | |
</ul> | |
<p><code>options</code> may also include a <code>start</code> option to allow writing data at | |
some position past the beginning of the file. Modifying a file rather | |
than replacing it may require a <code>flags</code> mode of <code>r+</code> rather than the | |
default mode <code>w</code>. The <code>encoding</code> can be any one of those accepted by | |
-<a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>.</p> | |
+<a href="#buffer_buffer"><code>Buffer</code></a>.</p> | |
<p>If <code>autoClose</code> is set to true (default behavior) on <code>'error'</code> or <code>'finish'</code> | |
the file descriptor will be closed automatically. If <code>autoClose</code> is false, | |
then the file descriptor won't be closed, even if there's an error. | |
@@ -22961,7 +22920,7 @@ | |
<p>Like <a href="#fs_class_fs_readstream"><code>ReadStream</code></a>, if <code>fd</code> is specified, <a href="#fs_class_fs_writestream"><code>WriteStream</code></a> will ignore the | |
<code>path</code> argument and will use the specified file descriptor. This means that no | |
<code>'open'</code> event will be emitted. Note that <code>fd</code> should be blocking; non-blocking | |
-<code>fd</code>s should be passed to <a href="net.html#net_class_net_socket"><code>net.Socket</code></a>.</p> | |
+<code>fd</code>s should be passed to <a href="#net_class_net_socket"><code>net.Socket</code></a>.</p> | |
<p>If <code>options</code> is a string, then it specifies the encoding.</p> | |
<h2>fs.exists(path, callback)<span><a class="mark" href="#fs_fs_exists_path_callback" id="fs_fs_exists_path_callback">#</a></span></h2> | |
<div class="api_metadata"> | |
@@ -22979,8 +22938,8 @@ | |
</td></tr> | |
</table> | |
</details> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#fs_fs_stat_path_options_callback"><code>fs.stat()</code></a> or <a href="#fs_fs_access_path_mode_callback"><code>fs.access()</code></a> instead.</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#fs_fs_stat_path_options_callback"><code>fs.stat()</code></a> or <a href="#fs_fs_access_path_mode_callback"><code>fs.access()</code></a> instead.</div><ul> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>exists</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
</ul> | |
@@ -23074,10 +23033,10 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
</ul> | |
-<p>Synchronous version of <a href="fs.html#fs_fs_exists_path_callback"><code>fs.exists()</code></a>. | |
+<p>Synchronous version of <a href="#fs_fs_exists_path_callback"><code>fs.exists()</code></a>. | |
Returns <code>true</code> if the path exists, <code>false</code> otherwise.</p> | |
<p>Note that <code>fs.exists()</code> is deprecated, but <code>fs.existsSync()</code> is not. | |
(The <code>callback</code> parameter to <code>fs.exists()</code> accepts parameters that are | |
@@ -23213,12 +23172,12 @@ | |
</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
-<li><code>stats</code> <a href="fs.html#fs_class_fs_stats" class="type"><fs.Stats></a></li> | |
+<li><code>stats</code> <a href="#fs_class_fs_stats" class="type"><fs.Stats></a></li> | |
</ul> | |
</li> | |
</ul> | |
<p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/fstat.2.html"><code>fstat(2)</code></a>. The callback gets two arguments <code>(err, stats)</code> where | |
-<code>stats</code> is an <a href="#fs_class_fs_stats"><code>fs.Stats</code></a> object. <code>fstat()</code> is identical to <a href="fs.html#fs_fs_stat_path_callback"><code>stat()</code></a>, | |
+<code>stats</code> is an <a href="#fs_class_fs_stats"><code>fs.Stats</code></a> object. <code>fstat()</code> is identical to <a href="#fs_fs_stat_path_callback"><code>stat()</code></a>, | |
except that the file to be stat-ed is specified by the file descriptor <code>fd</code>.</p> | |
<h2>fs.fstatSync(fd[, options])<span><a class="mark" href="#fs_fs_fstatsync_fd_options" id="fs_fs_fstatsync_fd_options">#</a></span></h2> | |
<div class="api_metadata"> | |
@@ -23240,7 +23199,7 @@ | |
<a href="#fs_class_fs_stats"><code>fs.Stats</code></a> object should be <code>bigint</code>. <strong>Default:</strong> <code>false</code>.</li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="fs.html#fs_class_fs_stats" class="type"><fs.Stats></a></li> | |
+<li>Returns: <a href="#fs_class_fs_stats" class="type"><fs.Stats></a></li> | |
</ul> | |
<p>Synchronous <a href="http://man7.org/linux/man-pages/man2/fstat.2.html"><code>fstat(2)</code></a>.</p> | |
<h2>fs.fsync(fd, callback)<span><a class="mark" href="#fs_fs_fsync_fd_callback" id="fs_fs_fsync_fd_callback">#</a></span></h2> | |
@@ -23411,7 +23370,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
@@ -23425,7 +23384,7 @@ | |
<div class="api_metadata"> | |
<span>Deprecated since: v0.4.7</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
</ul> | |
<p>Synchronous <a href="https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2"><code>lchmod(2)</code></a>. Returns <code>undefined</code>.</p> | |
@@ -23446,7 +23405,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>uid</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>gid</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
@@ -23467,7 +23426,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>uid</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>gid</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
</ul> | |
@@ -23492,8 +23451,8 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>existingPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
-<li><code>newPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>existingPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>newPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
</ul> | |
@@ -23515,8 +23474,8 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>existingPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
-<li><code>newPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>existingPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>newPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
</ul> | |
<p>Synchronous <a href="http://man7.org/linux/man-pages/man2/link.2.html"><code>link(2)</code></a>. Returns <code>undefined</code>.</p> | |
<h2>fs.lstat(path[, options], callback)<span><a class="mark" href="#fs_fs_lstat_path_options_callback" id="fs_fs_lstat_path_options_callback">#</a></span></h2> | |
@@ -23542,7 +23501,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>bigint</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> Whether the numeric values in the returned | |
<a href="#fs_class_fs_stats"><code>fs.Stats</code></a> object should be <code>bigint</code>. <strong>Default:</strong> <code>false</code>.</li> | |
@@ -23550,7 +23509,7 @@ | |
</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
-<li><code>stats</code> <a href="fs.html#fs_class_fs_stats" class="type"><fs.Stats></a></li> | |
+<li><code>stats</code> <a href="#fs_class_fs_stats" class="type"><fs.Stats></a></li> | |
</ul> | |
</li> | |
</ul> | |
@@ -23575,13 +23534,13 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>bigint</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> Whether the numeric values in the returned | |
<a href="#fs_class_fs_stats"><code>fs.Stats</code></a> object should be <code>bigint</code>. <strong>Default:</strong> <code>false</code>.</li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="fs.html#fs_class_fs_stats" class="type"><fs.Stats></a></li> | |
+<li>Returns: <a href="#fs_class_fs_stats" class="type"><fs.Stats></a></li> | |
</ul> | |
<p>Synchronous <a href="http://man7.org/linux/man-pages/man2/lstat.2.html"><code>lstat(2)</code></a>.</p> | |
<h2>fs.mkdir(path[, mode], callback)<span><a class="mark" href="#fs_fs_mkdir_path_mode_callback" id="fs_fs_mkdir_path_mode_callback">#</a></span></h2> | |
@@ -23604,7 +23563,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> Not supported on Windows. <strong>Default:</strong> <code>0o777</code>.</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
@@ -23628,7 +23587,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> Not supported on Windows. <strong>Default:</strong> <code>0o777</code>.</li> | |
</ul> | |
<p>Synchronously creates a directory. Returns <code>undefined</code>. | |
@@ -23738,7 +23697,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>flags</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> See <a href="#fs_file_system_flags">support of file system <code>flags</code></a>.</li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>0o666</code> (readable and writable)</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
@@ -23772,7 +23731,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>flags</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> See <a href="#fs_file_system_flags">support of file system <code>flags</code></a>.</li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>0o666</code></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
@@ -23797,14 +23756,14 @@ | |
</details> | |
</div><ul> | |
<li><code>fd</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
<li><code>offset</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>length</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>position</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
<li><code>bytesRead</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
</li> | |
</ul> | |
@@ -23842,14 +23801,14 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
</ul> | |
</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
-<li><code>files</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer[]></a></li> | |
+<li><code>files</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> | <a href="#buffer_class_buffer" class="type"><Buffer[]></a></li> | |
</ul> | |
</li> | |
</ul> | |
@@ -23874,7 +23833,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
</ul> | |
@@ -23912,7 +23871,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> filename or file descriptor</li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> filename or file descriptor</li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> <strong>Default:</strong> <code>null</code></li> | |
<li><code>flag</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> See <a href="#fs_file_system_flags">support of file system <code>flags</code></a>. <strong>Default:</strong> <code>'r'</code>.</li> | |
@@ -23920,7 +23879,7 @@ | |
</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
</li> | |
</ul> | |
@@ -23972,13 +23931,13 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> filename or file descriptor</li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> filename or file descriptor</li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> <strong>Default:</strong> <code>null</code></li> | |
<li><code>flag</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> See <a href="#fs_file_system_flags">support of file system <code>flags</code></a>. <strong>Default:</strong> <code>'r'</code>.</li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
<p>Synchronous version of <a href="#fs_fs_readfile_path_options_callback"><code>fs.readFile()</code></a>. Returns the contents of the <code>path</code>.</p> | |
<p>If the <code>encoding</code> option is specified then this function returns a | |
@@ -24012,14 +23971,14 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
</ul> | |
</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
-<li><code>linkString</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>linkString</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
</li> | |
</ul> | |
@@ -24043,12 +24002,12 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
<p>Synchronous <a href="http://man7.org/linux/man-pages/man2/readlink.2.html"><code>readlink(2)</code></a>. Returns the symbolic link's string value.</p> | |
<p>The optional <code>options</code> argument can be a string specifying an encoding, or an | |
@@ -24070,7 +24029,7 @@ | |
</details> | |
</div><ul> | |
<li><code>fd</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
<li><code>offset</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>length</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>position</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
@@ -24106,14 +24065,14 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
</ul> | |
</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
-<li><code>resolvedPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>resolvedPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
</li> | |
</ul> | |
@@ -24142,14 +24101,14 @@ | |
<div class="api_metadata"> | |
<span>Added in: v9.2.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
</ul> | |
</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
-<li><code>resolvedPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>resolvedPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
</li> | |
</ul> | |
@@ -24186,24 +24145,24 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
<p>Synchronous version of <a href="#fs_fs_realpath_path_options_callback"><code>fs.realpath()</code></a>. Returns the resolved pathname.</p> | |
<h2>fs.realpathSync.native(path[, options])<span><a class="mark" href="#fs_fs_realpathsync_native_path_options" id="fs_fs_realpathsync_native_path_options">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v9.2.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
<p>Synchronous <a href="http://man7.org/linux/man-pages/man3/realpath.3.html"><code>realpath(3)</code></a>.</p> | |
<p>Only paths that can be converted to UTF8 strings are supported.</p> | |
@@ -24234,8 +24193,8 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>oldPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
-<li><code>newPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>oldPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>newPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
</ul> | |
@@ -24265,8 +24224,8 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>oldPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
-<li><code>newPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>oldPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>newPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
</ul> | |
<p>Synchronous <a href="http://man7.org/linux/man-pages/man2/rename.2.html"><code>rename(2)</code></a>. Returns <code>undefined</code>.</p> | |
<h2>fs.rmdir(path, callback)<span><a class="mark" href="#fs_fs_rmdir_path_callback" id="fs_fs_rmdir_path_callback">#</a></span></h2> | |
@@ -24289,7 +24248,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
</ul> | |
@@ -24313,7 +24272,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
</ul> | |
<p>Synchronous <a href="http://man7.org/linux/man-pages/man2/rmdir.2.html"><code>rmdir(2)</code></a>. Returns <code>undefined</code>.</p> | |
<p>Using <code>fs.rmdirSync()</code> on a file (not a directory) results in an <code>ENOENT</code> error | |
@@ -24341,7 +24300,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>bigint</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> Whether the numeric values in the returned | |
<a href="#fs_class_fs_stats"><code>fs.Stats</code></a> object should be <code>bigint</code>. <strong>Default:</strong> <code>false</code>.</li> | |
@@ -24349,13 +24308,13 @@ | |
</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
-<li><code>stats</code> <a href="fs.html#fs_class_fs_stats" class="type"><fs.Stats></a></li> | |
+<li><code>stats</code> <a href="#fs_class_fs_stats" class="type"><fs.Stats></a></li> | |
</ul> | |
</li> | |
</ul> | |
<p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/stat.2.html"><code>stat(2)</code></a>. The callback gets two arguments <code>(err, stats)</code> where | |
<code>stats</code> is an <a href="#fs_class_fs_stats"><code>fs.Stats</code></a> object.</p> | |
-<p>In case of an error, the <code>err.code</code> will be one of <a href="errors.html#errors_common_system_errors">Common System Errors</a>.</p> | |
+<p>In case of an error, the <code>err.code</code> will be one of <a href="#errors_common_system_errors">Common System Errors</a>.</p> | |
<p>Using <code>fs.stat()</code> to check for the existence of a file before calling | |
<code>fs.open()</code>, <code>fs.readFile()</code> or <code>fs.writeFile()</code> is not recommended. | |
Instead, user code should open/read/write the file directly and handle the | |
@@ -24379,13 +24338,13 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>bigint</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> Whether the numeric values in the returned | |
<a href="#fs_class_fs_stats"><code>fs.Stats</code></a> object should be <code>bigint</code>. <strong>Default:</strong> <code>false</code>.</li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="fs.html#fs_class_fs_stats" class="type"><fs.Stats></a></li> | |
+<li>Returns: <a href="#fs_class_fs_stats" class="type"><fs.Stats></a></li> | |
</ul> | |
<p>Synchronous <a href="http://man7.org/linux/man-pages/man2/stat.2.html"><code>stat(2)</code></a>.</p> | |
<h2>fs.symlink(target, path[, type], callback)<span><a class="mark" href="#fs_fs_symlink_target_path_type_callback" id="fs_fs_symlink_target_path_type_callback">#</a></span></h2> | |
@@ -24402,8 +24361,8 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>target</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>target</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>type</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'file'</code></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
@@ -24434,8 +24393,8 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>target</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>target</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>type</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'file'</code></li> | |
</ul> | |
<p>Synchronous <a href="http://man7.org/linux/man-pages/man2/symlink.2.html"><code>symlink(2)</code></a>. Returns <code>undefined</code>.</p> | |
@@ -24456,7 +24415,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>len</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>0</code></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
@@ -24472,7 +24431,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.8.6</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>len</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>0</code></li> | |
</ul> | |
<p>Synchronous <a href="http://man7.org/linux/man-pages/man2/truncate.2.html"><code>truncate(2)</code></a>. Returns <code>undefined</code>. A file descriptor can also be | |
@@ -24499,7 +24458,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
</ul> | |
@@ -24530,14 +24489,14 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
</ul> | |
<p>Synchronous <a href="http://man7.org/linux/man-pages/man2/unlink.2.html"><code>unlink(2)</code></a>. Returns <code>undefined</code>.</p> | |
<h2>fs.unwatchFile(filename[, listener])<span><a class="mark" href="#fs_fs_unwatchfile_filename_listener" id="fs_fs_unwatchfile_filename_listener">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.31</span> | |
</div><ul> | |
-<li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>listener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Optional, a listener previously attached using | |
<code>fs.watchFile()</code></li> | |
</ul> | |
@@ -24575,7 +24534,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>atime</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date" class="type"><Date></a></li> | |
<li><code>mtime</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date" class="type"><Date></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
@@ -24611,7 +24570,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>atime</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>mtime</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
</ul> | |
@@ -24633,7 +24592,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>persistent</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> Indicates whether the process should continue to run | |
as long as files are being watched. <strong>Default:</strong> <code>true</code>.</li> | |
@@ -24647,10 +24606,10 @@ | |
</li> | |
<li><code>listener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type" class="type"><undefined></a> <strong>Default:</strong> <code>undefined</code><ul> | |
<li><code>eventType</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="fs.html#fs_class_fs_fswatcher" class="type"><fs.FSWatcher></a></li> | |
+<li>Returns: <a href="#fs_class_fs_fswatcher" class="type"><fs.FSWatcher></a></li> | |
</ul> | |
<p>Watch for changes on <code>filename</code>, where <code>filename</code> is either a file or a | |
directory.</p> | |
@@ -24727,15 +24686,15 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>persistent</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> <strong>Default:</strong> <code>true</code></li> | |
<li><code>interval</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>5007</code></li> | |
</ul> | |
</li> | |
<li><code>listener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
-<li><code>current</code> <a href="fs.html#fs_class_fs_stats" class="type"><fs.Stats></a></li> | |
-<li><code>previous</code> <a href="fs.html#fs_class_fs_stats" class="type"><fs.Stats></a></li> | |
+<li><code>current</code> <a href="#fs_class_fs_stats" class="type"><fs.Stats></a></li> | |
+<li><code>previous</code> <a href="#fs_class_fs_stats" class="type"><fs.Stats></a></li> | |
</ul> | |
</li> | |
</ul> | |
@@ -24798,14 +24757,14 @@ | |
</details> | |
</div><ul> | |
<li><code>fd</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
<li><code>offset</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>length</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>position</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
<li><code>bytesWritten</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
</ul> | |
</li> | |
</ul> | |
@@ -24864,7 +24823,7 @@ | |
<p><code>encoding</code> is the expected string encoding.</p> | |
<p>The callback will receive the arguments <code>(err, written, string)</code> where <code>written</code> | |
specifies how many <em>bytes</em> the passed string required to be written. Note that | |
-bytes written is not the same as string characters. See <a href="buffer.html#buffer_class_method_buffer_bytelength_string_encoding"><code>Buffer.byteLength</code></a>.</p> | |
+bytes written is not the same as string characters. See <a href="#buffer_class_method_buffer_bytelength_string_encoding"><code>Buffer.byteLength</code></a>.</p> | |
<p>Note that it is unsafe to use <code>fs.write</code> multiple times on the same file | |
without waiting for the callback. For this scenario, | |
<code>fs.createWriteStream</code> is strongly recommended.</p> | |
@@ -24894,8 +24853,8 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> filename or file descriptor</li> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
+<li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> filename or file descriptor</li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>0o666</code></li> | |
@@ -24942,8 +24901,8 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> filename or file descriptor</li> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
+<li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> filename or file descriptor</li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>0o666</code></li> | |
@@ -24970,7 +24929,7 @@ | |
</details> | |
</div><ul> | |
<li><code>fd</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
<li><code>offset</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>length</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>position</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
@@ -24998,7 +24957,7 @@ | |
</ul> | |
<p>Synchronous versions of <a href="#fs_fs_write_fd_buffer_offset_length_position_callback"><code>fs.write()</code></a>. Returns the number of bytes written.</p> | |
<h2>fs Promises API<span><a class="mark" href="#fs_fs_promises_api" id="fs_fs_promises_api">#</a></span></h2> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>The <code>fs.promises</code> API provides an alternative set of asynchronous file system | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>The <code>fs.promises</code> API provides an alternative set of asynchronous file system | |
methods that return <code>Promise</code> objects rather than using callbacks. The | |
API is accessible via <code>require('fs').promises</code>.</p> | |
<h3>class: FileHandle<span><a class="mark" href="#fs_class_filehandle" id="fs_class_filehandle">#</a></span></h3> | |
@@ -25020,7 +24979,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>0o666</code></li> | |
@@ -25030,7 +24989,7 @@ | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
</ul> | |
<p>Asynchronously append data to this file, creating the file if it does not yet | |
-exist. <code>data</code> can be a string or a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>. The <code>Promise</code> will be | |
+exist. <code>data</code> can be a string or a <a href="#buffer_buffer"><code>Buffer</code></a>. The <code>Promise</code> will be | |
resolved with no arguments upon success.</p> | |
<p>If <code>options</code> is a string, then it specifies the encoding.</p> | |
<p>The <code>FileHandle</code> must have been opened for appending.</p> | |
@@ -25091,7 +25050,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
<li><code>offset</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>length</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>position</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
@@ -25234,7 +25193,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
<li><code>offset</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>length</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>position</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
@@ -25259,7 +25218,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>0o666</code></li> | |
@@ -25280,7 +25239,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>fs.constants.F_OK</code></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
</ul> | |
@@ -25309,8 +25268,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> | <a href="fs.html#fs_class_filehandle" class="type"><FileHandle></a> filename or <code>FileHandle</code></li> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> | <a href="#fs_class_filehandle" class="type"><FileHandle></a> filename or <code>FileHandle</code></li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>0o666</code></li> | |
@@ -25320,7 +25279,7 @@ | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
</ul> | |
<p>Asynchronously append data to a file, creating the file if it does not yet | |
-exist. <code>data</code> can be a string or a <a href="buffer.html#buffer_class_buffer"><code>Buffer</code></a>. The <code>Promise</code> will be | |
+exist. <code>data</code> can be a string or a <a href="#buffer_buffer"><code>Buffer</code></a>. The <code>Promise</code> will be | |
resolved with no arguments upon success.</p> | |
<p>If <code>options</code> is a string, then it specifies the encoding.</p> | |
<p>The <code>path</code> may be specified as a <code>FileHandle</code> that has been opened | |
@@ -25329,7 +25288,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
</ul> | |
@@ -25339,7 +25298,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>uid</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>gid</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
@@ -25350,8 +25309,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>src</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> source filename to copy</li> | |
-<li><code>dest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> destination filename of the copy operation</li> | |
+<li><code>src</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> source filename to copy</li> | |
+<li><code>dest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> destination filename of the copy operation</li> | |
<li><code>flags</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> modifiers for copy operation. <strong>Default:</strong> <code>0</code>.</li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
</ul> | |
@@ -25397,7 +25356,7 @@ | |
<div class="api_metadata"> | |
<span>Deprecated since: v10.0.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
</ul> | |
@@ -25417,7 +25376,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>uid</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li><code>gid</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
@@ -25428,8 +25387,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>existingPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
-<li><code>newPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>existingPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>newPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
</ul> | |
<p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/link.2.html"><code>link(2)</code></a>. The <code>Promise</code> is resolved with no arguments upon success.</p> | |
@@ -25447,7 +25406,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>bigint</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> Whether the numeric values in the returned | |
<a href="#fs_class_fs_stats"><code>fs.Stats</code></a> object should be <code>bigint</code>. <strong>Default:</strong> <code>false</code>.</li> | |
@@ -25461,7 +25420,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>0o777</code></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
</ul> | |
@@ -25495,7 +25454,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>flags</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> See <a href="#fs_file_system_flags">support of file system <code>flags</code></a>.</li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>0o666</code> (readable and writable)</li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
@@ -25512,7 +25471,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
</ul> | |
@@ -25529,7 +25488,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> | <a href="fs.html#fs_class_filehandle" class="type"><FileHandle></a> filename or <code>FileHandle</code></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> | <a href="#fs_class_filehandle" class="type"><FileHandle></a> filename or <code>FileHandle</code></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> <strong>Default:</strong> <code>null</code></li> | |
<li><code>flag</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> See <a href="#fs_file_system_flags">support of file system <code>flags</code></a>. <strong>Default:</strong> <code>'r'</code>.</li> | |
@@ -25551,7 +25510,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
</ul> | |
@@ -25568,7 +25527,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
</ul> | |
@@ -25590,8 +25549,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>oldPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
-<li><code>newPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>oldPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>newPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
</ul> | |
<p>Renames <code>oldPath</code> to <code>newPath</code> and resolves the <code>Promise</code> with no arguments | |
@@ -25600,7 +25559,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
</ul> | |
<p>Removes the directory identified by <code>path</code> then resolves the <code>Promise</code> with | |
@@ -25622,7 +25581,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>bigint</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> Whether the numeric values in the returned | |
<a href="#fs_class_fs_stats"><code>fs.Stats</code></a> object should be <code>bigint</code>. <strong>Default:</strong> <code>false</code>.</li> | |
@@ -25635,8 +25594,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>target</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>target</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>type</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'file'</code></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
</ul> | |
@@ -25650,7 +25609,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>len</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>0</code></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
</ul> | |
@@ -25660,7 +25619,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
</ul> | |
<p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/unlink.2.html"><code>unlink(2)</code></a>. The <code>Promise</code> is resolved with no arguments upon | |
@@ -25669,7 +25628,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>atime</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date" class="type"><Date></a></li> | |
<li><code>mtime</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date" class="type"><Date></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a></li> | |
@@ -25687,8 +25646,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> | <a href="fs.html#fs_class_filehandle" class="type"><FileHandle></a> filename or <code>FileHandle</code></li> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
+<li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> | <a href="#fs_class_filehandle" class="type"><FileHandle></a> filename or <code>FileHandle</code></li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a><ul> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
<li><code>mode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> <strong>Default:</strong> <code>0o666</code></li> | |
@@ -26028,8 +25987,6 @@ | |
<code>EPERM</code>. Existing hidden files can be opened for writing with the <code>'r+'</code> flag.</p> | |
<p>A call to <code>fs.ftruncate()</code> or <code>fsPromises.ftruncate()</code> can be used to reset | |
the file contents.</p> | |
-<!-- [end-include:fs.md] --> | |
-<!-- [start-include:globals.md] --> | |
<h1>Global Objects<span><a class="mark" href="#globals_global_objects" id="globals_global_objects">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
<!-- type=misc --> | |
@@ -26039,9 +25996,9 @@ | |
<ul> | |
<li><a href="#modules_dirname"><code>__dirname</code></a></li> | |
<li><a href="#modules_filename"><code>__filename</code></a></li> | |
-<li><a href="modules.html#modules_exports"><code>exports</code></a></li> | |
-<li><a href="modules.html#modules_module"><code>module</code></a></li> | |
-<li><a href="globals.html#globals_require"><code>require()</code></a></li> | |
+<li><a href="#modules_exports"><code>exports</code></a></li> | |
+<li><a href="#modules_module"><code>module</code></a></li> | |
+<li><a href="#modules_require"><code>require()</code></a></li> | |
</ul> | |
<p>The objects listed here are specific to Node.js. There are a number of | |
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects">built-in objects</a> that are part of the JavaScript language itself, which are | |
@@ -26062,17 +26019,17 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.9.1</span> | |
</div><!--type=global--> | |
-<p><a href="timers.html#timers_clearimmediate_immediate"><code>clearImmediate</code></a> is described in the <a href="timers.html">timers</a> section.</p> | |
+<p><a href="#timers_clearimmediate_immediate"><code>clearImmediate</code></a> is described in the <a href="timers.html">timers</a> section.</p> | |
<h2>clearInterval(intervalObject)<span><a class="mark" href="#globals_clearinterval_intervalobject" id="globals_clearinterval_intervalobject">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.0.1</span> | |
</div><!--type=global--> | |
-<p><a href="timers.html#timers_clearinterval_timeout"><code>clearInterval</code></a> is described in the <a href="timers.html">timers</a> section.</p> | |
+<p><a href="#timers_clearinterval_timeout"><code>clearInterval</code></a> is described in the <a href="timers.html">timers</a> section.</p> | |
<h2>clearTimeout(timeoutObject)<span><a class="mark" href="#globals_cleartimeout_timeoutobject" id="globals_cleartimeout_timeoutobject">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.0.1</span> | |
</div><!--type=global--> | |
-<p><a href="timers.html#timers_cleartimeout_timeout"><code>clearTimeout</code></a> is described in the <a href="timers.html">timers</a> section.</p> | |
+<p><a href="#timers_cleartimeout_timeout"><code>clearTimeout</code></a> is described in the <a href="timers.html">timers</a> section.</p> | |
<h2>console<span><a class="mark" href="#globals_console" id="globals_console">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.100</span> | |
@@ -26082,7 +26039,7 @@ | |
</ul> | |
<p>Used to print to stdout and stderr. See the <a href="console.html"><code>console</code></a> section.</p> | |
<h2>exports<span><a class="mark" href="#globals_exports" id="globals_exports">#</a></span></h2> | |
-<p>This variable may appear to be global but is not. See <a href="modules.html#modules_exports"><code>exports</code></a>.</p> | |
+<p>This variable may appear to be global but is not. See <a href="#modules_exports"><code>exports</code></a>.</p> | |
<h2>global<span><a class="mark" href="#globals_global" id="globals_global">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.27</span> | |
@@ -26095,7 +26052,7 @@ | |
Node.js this is different. The top-level scope is not the global scope; | |
<code>var something</code> inside a Node.js module will be local to that module.</p> | |
<h2>module<span><a class="mark" href="#globals_module" id="globals_module">#</a></span></h2> | |
-<p>This variable may appear to be global but is not. See <a href="modules.html#modules_module"><code>module</code></a>.</p> | |
+<p>This variable may appear to be global but is not. See <a href="#modules_module"><code>module</code></a>.</p> | |
<h2>process<span><a class="mark" href="#globals_process" id="globals_process">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.7</span> | |
@@ -26103,39 +26060,37 @@ | |
<ul> | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> | |
</ul> | |
-<p>The process object. See the <a href="process.html#process_process"><code>process</code> object</a> section.</p> | |
+<p>The process object. See the <a href="#process_process"><code>process</code> object</a> section.</p> | |
<h2>require()<span><a class="mark" href="#globals_require" id="globals_require">#</a></span></h2> | |
-<p>This variable may appear to be global but is not. See <a href="globals.html#globals_require"><code>require()</code></a>.</p> | |
+<p>This variable may appear to be global but is not. See <a href="#modules_require"><code>require()</code></a>.</p> | |
<h2>setImmediate(callback[, ...args])<span><a class="mark" href="#globals_setimmediate_callback_args" id="globals_setimmediate_callback_args">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.9.1</span> | |
</div><!-- type=global --> | |
-<p><a href="timers.html#timers_setimmediate_callback_args"><code>setImmediate</code></a> is described in the <a href="timers.html">timers</a> section.</p> | |
+<p><a href="#timers_setimmediate_callback_args"><code>setImmediate</code></a> is described in the <a href="timers.html">timers</a> section.</p> | |
<h2>setInterval(callback, delay[, ...args])<span><a class="mark" href="#globals_setinterval_callback_delay_args" id="globals_setinterval_callback_delay_args">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.0.1</span> | |
</div><!-- type=global --> | |
-<p><a href="timers.html#timers_setinterval_callback_delay_args"><code>setInterval</code></a> is described in the <a href="timers.html">timers</a> section.</p> | |
+<p><a href="#timers_setinterval_callback_delay_args"><code>setInterval</code></a> is described in the <a href="timers.html">timers</a> section.</p> | |
<h2>setTimeout(callback, delay[, ...args])<span><a class="mark" href="#globals_settimeout_callback_delay_args" id="globals_settimeout_callback_delay_args">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.0.1</span> | |
</div><!-- type=global --> | |
-<p><a href="timers.html#timers_settimeout_callback_delay_args"><code>setTimeout</code></a> is described in the <a href="timers.html">timers</a> section.</p> | |
+<p><a href="#timers_settimeout_callback_delay_args"><code>setTimeout</code></a> is described in the <a href="timers.html">timers</a> section.</p> | |
<h2>URL<span><a class="mark" href="#globals_url" id="globals_url">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><!-- type=global --> | |
-<p>The WHATWG <code>URL</code> class. See the <a href="url.html#url_class_url"><code>URL</code></a> section.</p> | |
+<p>The WHATWG <code>URL</code> class. See the <a href="#url_class_url"><code>URL</code></a> section.</p> | |
<h2>URLSearchParams<span><a class="mark" href="#globals_urlsearchparams" id="globals_urlsearchparams">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><!-- type=global --> | |
<p>The WHATWG <code>URLSearchParams</code> class. See the <a href="#url_class_urlsearchparams"><code>URLSearchParams</code></a> section.</p> | |
-<!-- [end-include:globals.md] --> | |
-<!-- [start-include:http.md] --> | |
<h1>HTTP<span><a class="mark" href="#http_http" id="http_http">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>To use the HTTP server and client one must <code>require('http')</code>.</p> | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>To use the HTTP server and client one must <code>require('http')</code>.</p> | |
<p>The HTTP interfaces in Node.js are designed to support many features | |
of the protocol which have been traditionally difficult to use. | |
In particular, large, possibly chunk-encoded, messages. The interface is | |
@@ -26187,7 +26142,7 @@ | |
<p>When a connection is closed by the client or the server, it is removed | |
from the pool. Any unused sockets in the pool will be unrefed so as not | |
to keep the Node.js process running when there are no outstanding requests. | |
-(see <a href="net.html#net_socket_unref"><code>socket.unref()</code></a>).</p> | |
+(see <a href="#net_socket_unref"><code>socket.unref()</code></a>).</p> | |
<p>It is good practice, to <a href="#http_agent_destroy"><code>destroy()</code></a> an <code>Agent</code> instance when it is no | |
longer in use, because unused sockets consume OS resources.</p> | |
<p>Sockets are removed from an agent when the socket emits either | |
@@ -26224,7 +26179,7 @@ | |
outstanding requests, so they can be used for future requests without | |
having to reestablish a TCP connection. <strong>Default:</strong> <code>false</code>.</li> | |
<li><code>keepAliveMsecs</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> When using the <code>keepAlive</code> option, specifies | |
-the <a href="net.html#net_socket_setkeepalive_enable_initialdelay">initial delay</a> | |
+the <a href="#net_socket_setkeepalive_enable_initialdelay">initial delay</a> | |
for TCP Keep-Alive packets. Ignored when the | |
<code>keepAlive</code> option is <code>false</code> or <code>undefined</code>. <strong>Default:</strong> <code>1000</code>.</li> | |
<li><code>maxSockets</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Maximum number of sockets to allow per | |
@@ -26235,9 +26190,9 @@ | |
</ul> | |
</li> | |
</ul> | |
-<p>The default <a href="#http_http_globalagent"><code>http.globalAgent</code></a> that is used by <a href="http.html#http_http_request_options_callback"><code>http.request()</code></a> has all | |
+<p>The default <a href="#http_http_globalagent"><code>http.globalAgent</code></a> that is used by <a href="#http_http_request_options_callback"><code>http.request()</code></a> has all | |
of these values set to their respective defaults.</p> | |
-<p>To configure any of them, a custom <a href="http.html#http_class_http_agent"><code>http.Agent</code></a> instance must be created.</p> | |
+<p>To configure any of them, a custom <a href="#http_class_http_agent"><code>http.Agent</code></a> instance must be created.</p> | |
<pre><code class="lang-js">const http = require('http'); | |
const keepAliveAgent = new http.Agent({ keepAlive: true }); | |
options.agent = keepAliveAgent; | |
@@ -26248,12 +26203,12 @@ | |
<span>Added in: v0.11.4</span> | |
</div><ul> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> Options containing connection details. Check | |
-<a href="#net_net_createconnection"><code>net.createConnection()</code></a> for the format of the options</li> | |
+<a href="#net_net_createconnection_options_connectlistener"><code>net.createConnection()</code></a> for the format of the options</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Callback function that receives the created socket</li> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
</ul> | |
<p>Produces a socket/stream to be used for HTTP requests.</p> | |
-<p>By default, this function is the same as <a href="#net_net_createconnection"><code>net.createConnection()</code></a>. However, | |
+<p>By default, this function is the same as <a href="#net_net_createconnection_options_connectlistener"><code>net.createConnection()</code></a>. However, | |
custom agents may override this method in case greater flexibility is desired.</p> | |
<p>A socket/stream can be supplied in one of two ways: by returning the | |
socket/stream from this function, or by passing the socket/stream to <code>callback</code>.</p> | |
@@ -26262,7 +26217,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.1.0</span> | |
</div><ul> | |
-<li><code>socket</code> <a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li><code>socket</code> <a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
</ul> | |
<p>Called when <code>socket</code> is detached from a request and could be persisted by the | |
<code>Agent</code>. Default behavior is to:</p> | |
@@ -26277,8 +26232,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.1.0</span> | |
</div><ul> | |
-<li><code>socket</code> <a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
-<li><code>request</code> <a href="http.html#http_class_http_clientrequest" class="type"><http.ClientRequest></a></li> | |
+<li><code>socket</code> <a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li><code>request</code> <a href="#http_class_http_clientrequest" class="type"><http.ClientRequest></a></li> | |
</ul> | |
<p>Called when <code>socket</code> is attached to <code>request</code> after being persisted because of | |
the keep-alive options. Default behavior is to:</p> | |
@@ -26358,7 +26313,7 @@ | |
<h2>Class: http.ClientRequest<span><a class="mark" href="#http_class_http_clientrequest" id="http_class_http_clientrequest">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.17</span> | |
-</div><p>This object is created internally and returned from <a href="http.html#http_http_request_options_callback"><code>http.request()</code></a>. It | |
+</div><p>This object is created internally and returned from <a href="#http_http_request_options_callback"><code>http.request()</code></a>. It | |
represents an <em>in-progress</em> request whose header has already been queued. The | |
header is still mutable using the <a href="#http_request_setheader_name_value"><code>setHeader(name, value)</code></a>, | |
<a href="#http_request_getheader_name"><code>getHeader(name)</code></a>, <a href="#http_request_removeheader_name"><code>removeHeader(name)</code></a> API. The actual header will | |
@@ -26379,8 +26334,8 @@ | |
'process out of memory' error.</p> | |
<p>Node.js does not check whether Content-Length and the length of the | |
body which has been transmitted are equal or not.</p> | |
-<p>The request implements the <a href="stream.html#stream_writable_streams">Writable Stream</a> interface. This is an | |
-<a href="events.html"><code>EventEmitter</code></a> with the following events:</p> | |
+<p>The request implements the <a href="#stream_class_stream_writable">Writable Stream</a> interface. This is an | |
+<a href="#events_class_eventemitter"><code>EventEmitter</code></a> with the following events:</p> | |
<h3>Event: 'abort'<span><a class="mark" href="#http_event_abort" id="http_event_abort">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v1.4.1</span> | |
@@ -26390,9 +26345,9 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.7.0</span> | |
</div><ul> | |
-<li><code>response</code> <a href="http.html#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a></li> | |
-<li><code>socket</code> <a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
-<li><code>head</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>response</code> <a href="#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a></li> | |
+<li><code>socket</code> <a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li><code>head</code> <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
<p>Emitted each time a server responds to a request with a <code>CONNECT</code> method. If | |
this event is not being listened for, clients receiving a <code>CONNECT</code> method will | |
@@ -26486,7 +26441,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.0</span> | |
</div><ul> | |
-<li><code>response</code> <a href="http.html#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a></li> | |
+<li><code>response</code> <a href="#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a></li> | |
</ul> | |
<p>Emitted when a response is received to this request. This event is emitted only | |
once.</p> | |
@@ -26494,7 +26449,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.5.3</span> | |
</div><ul> | |
-<li><code>socket</code> <a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li><code>socket</code> <a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
</ul> | |
<p>Emitted after a socket is assigned to this request.</p> | |
<h3>Event: 'timeout'<span><a class="mark" href="#http_event_timeout" id="http_event_timeout">#</a></span></h3> | |
@@ -26507,9 +26462,9 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.94</span> | |
</div><ul> | |
-<li><code>response</code> <a href="http.html#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a></li> | |
-<li><code>socket</code> <a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
-<li><code>head</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>response</code> <a href="#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a></li> | |
+<li><code>socket</code> <a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li><code>head</code> <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
<p>Emitted each time a server responds to a request with an upgrade. If this | |
event is not being listened for and the response status code is 101 Switching | |
@@ -26582,7 +26537,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.3.0</span> | |
</div><ul> | |
-<li><a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li><a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
</ul> | |
<p>See <a href="#http_request_socket"><code>request.socket</code></a>.</p> | |
<h3>request.end([data[, encoding]][, callback])<span><a class="mark" href="#http_request_end_data_encoding_callback" id="http_request_end_data_encoding_callback">#</a></span></h3> | |
@@ -26599,7 +26554,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this" class="type"><this></a></li> | |
@@ -26683,7 +26638,7 @@ | |
<li><code>noDelay</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
</ul> | |
<p>Once a socket is assigned to this request and is connected | |
-<a href="net.html#net_socket_setnodelay_nodelay"><code>socket.setNoDelay()</code></a> will be called.</p> | |
+<a href="#net_socket_setnodelay_nodelay"><code>socket.setNoDelay()</code></a> will be called.</p> | |
<h3>request.setSocketKeepAlive([enable][, initialDelay])<span><a class="mark" href="#http_request_setsocketkeepalive_enable_initialdelay" id="http_request_setsocketkeepalive_enable_initialdelay">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.5.9</span> | |
@@ -26692,7 +26647,7 @@ | |
<li><code>initialDelay</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
</ul> | |
<p>Once a socket is assigned to this request and is connected | |
-<a href="net.html#net_socket_setkeepalive_enable_initialdelay"><code>socket.setKeepAlive()</code></a> will be called.</p> | |
+<a href="#net_socket_setkeepalive_enable_initialdelay"><code>socket.setKeepAlive()</code></a> will be called.</p> | |
<h3>request.setTimeout(timeout[, callback])<span><a class="mark" href="#http_request_settimeout_timeout_callback" id="http_request_settimeout_timeout_callback">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.5.9</span> | |
@@ -26700,7 +26655,7 @@ | |
<li><code>timeout</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Milliseconds before a request times out.</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Optional function to be called when a timeout occurs. | |
Same as binding to the <code>'timeout'</code> event.</li> | |
-<li>Returns: <a href="http.html#http_class_http_clientrequest" class="type"><http.ClientRequest></a></li> | |
+<li>Returns: <a href="#http_class_http_clientrequest" class="type"><http.ClientRequest></a></li> | |
</ul> | |
<p>Once a socket is assigned to this request and is connected | |
<a href="#net_socket_settimeout_timeout_callback"><code>socket.setTimeout()</code></a> will be called.</p> | |
@@ -26708,7 +26663,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.3.0</span> | |
</div><ul> | |
-<li><a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li><a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
</ul> | |
<p>Reference to the underlying socket. Usually users will not want to access | |
this property. In particular, the socket will not emit <code>'readable'</code> events | |
@@ -26732,7 +26687,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.29</span> | |
</div><ul> | |
-<li><code>chunk</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>chunk</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
@@ -26752,35 +26707,35 @@ | |
<h2>Class: http.Server<span><a class="mark" href="#http_class_http_server" id="http_class_http_server">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.17</span> | |
-</div><p>This class inherits from <a href="net.html#net_class_net_server"><code>net.Server</code></a> and has the following additional | |
+</div><p>This class inherits from <a href="#net_class_net_server"><code>net.Server</code></a> and has the following additional | |
events:</p> | |
<h3>Event: 'checkContinue'<span><a class="mark" href="#http_event_checkcontinue" id="http_event_checkcontinue">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.3.0</span> | |
</div><ul> | |
-<li><code>request</code> <a href="http.html#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a></li> | |
-<li><code>response</code> <a href="http.html#http_class_http_serverresponse" class="type"><http.ServerResponse></a></li> | |
+<li><code>request</code> <a href="#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a></li> | |
+<li><code>response</code> <a href="#http_class_http_serverresponse" class="type"><http.ServerResponse></a></li> | |
</ul> | |
<p>Emitted each time a request with an HTTP <code>Expect: 100-continue</code> is received. | |
If this event is not listened for, the server will automatically respond | |
with a <code>100 Continue</code> as appropriate.</p> | |
-<p>Handling this event involves calling <a href="#http2_response_writecontinue"><code>response.writeContinue()</code></a> if the | |
+<p>Handling this event involves calling <a href="#http_response_writecontinue"><code>response.writeContinue()</code></a> if the | |
client should continue to send the request body, or generating an appropriate | |
HTTP response (e.g. 400 Bad Request) if the client should not continue to send | |
the request body.</p> | |
-<p>Note that when this event is emitted and handled, the <a href="#http2_event_request"><code>'request'</code></a> event will | |
+<p>Note that when this event is emitted and handled, the <a href="#http_event_request"><code>'request'</code></a> event will | |
not be emitted.</p> | |
<h3>Event: 'checkExpectation'<span><a class="mark" href="#http_event_checkexpectation" id="http_event_checkexpectation">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v5.5.0</span> | |
</div><ul> | |
-<li><code>request</code> <a href="http.html#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a></li> | |
-<li><code>response</code> <a href="http.html#http_class_http_serverresponse" class="type"><http.ServerResponse></a></li> | |
+<li><code>request</code> <a href="#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a></li> | |
+<li><code>response</code> <a href="#http_class_http_serverresponse" class="type"><http.ServerResponse></a></li> | |
</ul> | |
<p>Emitted each time a request with an HTTP <code>Expect</code> header is received, where the | |
value is not <code>100-continue</code>. If this event is not listened for, the server will | |
automatically respond with a <code>417 Expectation Failed</code> as appropriate.</p> | |
-<p>Note that when this event is emitted and handled, the <a href="#http2_event_request"><code>'request'</code></a> event will | |
+<p>Note that when this event is emitted and handled, the <a href="#http_event_request"><code>'request'</code></a> event will | |
not be emitted.</p> | |
<h3>Event: 'clientError'<span><a class="mark" href="#http_event_clienterror" id="http_event_clienterror">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -26800,7 +26755,7 @@ | |
</details> | |
</div><ul> | |
<li><code>exception</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
-<li><code>socket</code> <a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li><code>socket</code> <a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
</ul> | |
<p>If a client connection emits an <code>'error'</code> event, it will be forwarded here. | |
Listener of this event is responsible for closing/destroying the underlying | |
@@ -26808,7 +26763,7 @@ | |
custom HTTP response instead of abruptly severing the connection.</p> | |
<p>Default behavior is to close the socket with an HTTP '400 Bad Request' response | |
if possible, otherwise the socket is immediately destroyed.</p> | |
-<p><code>socket</code> is the <a href="net.html#net_class_net_socket"><code>net.Socket</code></a> object that the error originated from.</p> | |
+<p><code>socket</code> is the <a href="#net_class_net_socket"><code>net.Socket</code></a> object that the error originated from.</p> | |
<pre><code class="lang-js">const http = require('http'); | |
const server = http.createServer((req, res) => { | |
@@ -26837,10 +26792,10 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.7.0</span> | |
</div><ul> | |
-<li><code>request</code> <a href="http.html#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a> Arguments for the HTTP request, as it is in | |
-the <a href="#http2_event_request"><code>'request'</code></a> event</li> | |
-<li><code>socket</code> <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> Network socket between the server and client</li> | |
-<li><code>head</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> The first packet of the tunneling stream (may be empty)</li> | |
+<li><code>request</code> <a href="#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a> Arguments for the HTTP request, as it is in | |
+the <a href="#http_event_request"><code>'request'</code></a> event</li> | |
+<li><code>socket</code> <a href="#net_class_net_socket" class="type"><net.Socket></a> Network socket between the server and client</li> | |
+<li><code>head</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> The first packet of the tunneling stream (may be empty)</li> | |
</ul> | |
<p>Emitted each time a client requests an HTTP <code>CONNECT</code> method. If this event is | |
not listened for, then clients requesting a <code>CONNECT</code> method will have their | |
@@ -26852,10 +26807,10 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.0</span> | |
</div><ul> | |
-<li><code>socket</code> <a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li><code>socket</code> <a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
</ul> | |
<p>This event is emitted when a new TCP stream is established. <code>socket</code> is | |
-typically an object of type <a href="net.html#net_class_net_socket"><code>net.Socket</code></a>. Usually users will not want to | |
+typically an object of type <a href="#net_class_net_socket"><code>net.Socket</code></a>. Usually users will not want to | |
access this event. In particular, the socket will not emit <code>'readable'</code> events | |
because of how the protocol parser attaches to the socket. The <code>socket</code> can | |
also be accessed at <code>request.connection</code>.</p> | |
@@ -26865,8 +26820,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.0</span> | |
</div><ul> | |
-<li><code>request</code> <a href="http.html#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a></li> | |
-<li><code>response</code> <a href="http.html#http_class_http_serverresponse" class="type"><http.ServerResponse></a></li> | |
+<li><code>request</code> <a href="#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a></li> | |
+<li><code>response</code> <a href="#http_class_http_serverresponse" class="type"><http.ServerResponse></a></li> | |
</ul> | |
<p>Emitted each time there is a request. Note that there may be multiple requests | |
per connection (in the case of HTTP Keep-Alive connections).</p> | |
@@ -26884,10 +26839,10 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>request</code> <a href="http.html#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a> Arguments for the HTTP request, as it is in | |
-the <a href="#http2_event_request"><code>'request'</code></a> event</li> | |
-<li><code>socket</code> <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> Network socket between the server and client</li> | |
-<li><code>head</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> The first packet of the upgraded stream (may be empty)</li> | |
+<li><code>request</code> <a href="#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a> Arguments for the HTTP request, as it is in | |
+the <a href="#http_event_request"><code>'request'</code></a> event</li> | |
+<li><code>socket</code> <a href="#net_class_net_socket" class="type"><net.Socket></a> Network socket between the server and client</li> | |
+<li><code>head</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> The first packet of the upgraded stream (may be empty)</li> | |
</ul> | |
<p>Emitted each time a client requests an HTTP upgrade. Listening to this event | |
is optional and clients cannot insist on a protocol change.</p> | |
@@ -26900,10 +26855,10 @@ | |
</div><ul> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
</ul> | |
-<p>Stops the server from accepting new connections. See <a href="net.html#net_server_close_callback"><code>net.Server.close()</code></a>.</p> | |
+<p>Stops the server from accepting new connections. See <a href="#net_server_close_callback"><code>net.Server.close()</code></a>.</p> | |
<h3>server.listen()<span><a class="mark" href="#http_server_listen" id="http_server_listen">#</a></span></h3> | |
<p>Starts the HTTP server listening for connections. | |
-This method is identical to <a href="net.html#net_server_listen"><code>server.listen()</code></a> from <a href="net.html#net_class_net_server"><code>net.Server</code></a>.</p> | |
+This method is identical to <a href="#net_server_listen"><code>server.listen()</code></a> from <a href="#net_class_net_server"><code>net.Server</code></a>.</p> | |
<h3>server.listening<span><a class="mark" href="#http_server_listening" id="http_server_listening">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v5.7.0</span> | |
@@ -26923,7 +26878,7 @@ | |
</div><ul> | |
<li><code>msecs</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> <strong>Default:</strong> <code>120000</code> (2 minutes)</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
-<li>Returns: <a href="http.html#http_class_http_server" class="type"><http.Server></a></li> | |
+<li>Returns: <a href="#http_class_http_server" class="type"><http.Server></a></li> | |
</ul> | |
<p>Sets the timeout value for sockets, and emits a <code>'timeout'</code> event on | |
the Server object, passing the socket as an argument, if a timeout | |
@@ -26965,9 +26920,9 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.17</span> | |
</div><p>This object is created internally by an HTTP server — not by the user. It is | |
-passed as the second parameter to the <a href="#http2_event_request"><code>'request'</code></a> event.</p> | |
-<p>The response implements, but does not inherit from, the <a href="stream.html#stream_writable_streams">Writable Stream</a> | |
-interface. This is an <a href="events.html"><code>EventEmitter</code></a> with the following events:</p> | |
+passed as the second parameter to the <a href="#http_event_request"><code>'request'</code></a> event.</p> | |
+<p>The response implements, but does not inherit from, the <a href="#stream_class_stream_writable">Writable Stream</a> | |
+interface. This is an <a href="#events_class_eventemitter"><code>EventEmitter</code></a> with the following events:</p> | |
<h3>Event: 'close'<span><a class="mark" href="#http_event_close_1" id="http_event_close_1">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.6.7</span> | |
@@ -27000,14 +26955,14 @@ | |
response.end(); | |
</code></pre> | |
<p>Attempting to set a header field name or value that contains invalid characters | |
-will result in a <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> being thrown.</p> | |
+will result in a <a href="#errors_class_typeerror"><code>TypeError</code></a> being thrown.</p> | |
<h3>response.connection<span><a class="mark" href="#http_response_connection" id="http_response_connection">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.3.0</span> | |
</div><ul> | |
-<li><a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li><a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
</ul> | |
-<p>See <a href="#http2_response_socket"><code>response.socket</code></a>.</p> | |
+<p>See <a href="#http_response_socket"><code>response.socket</code></a>.</p> | |
<h3>response.end([data][, encoding][, callback])<span><a class="mark" href="#http_response_end_data_encoding_callback" id="http_response_end_data_encoding_callback">#</a></span></h3> | |
<div class="api_metadata"> | |
<details class="changelog"><summary>History</summary> | |
@@ -27022,7 +26977,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this" class="type"><this></a></li> | |
@@ -27031,7 +26986,7 @@ | |
have been sent; that server should consider this message complete. | |
The method, <code>response.end()</code>, MUST be called on each response.</p> | |
<p>If <code>data</code> is specified, it is equivalent to calling | |
-<a href="http.html#http_response_write_chunk_encoding_callback"><code>response.write(data, encoding)</code></a> followed by <code>response.end(callback)</code>.</p> | |
+<a href="#http_response_write_chunk_encoding_callback"><code>response.write(data, encoding)</code></a> followed by <code>response.end(callback)</code>.</p> | |
<p>If <code>callback</code> is specified, it will be called when the response stream | |
is finished.</p> | |
<h3>response.finished<span><a class="mark" href="#http_response_finished" id="http_response_finished">#</a></span></h3> | |
@@ -27041,7 +26996,7 @@ | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
</ul> | |
<p>Boolean value that indicates whether the response has completed. Starts | |
-as <code>false</code>. After <a href="#http2_response_end_data_encoding_callback"><code>response.end()</code></a> executes, the value will be <code>true</code>.</p> | |
+as <code>false</code>. After <a href="#http_response_end_data_encoding_callback"><code>response.end()</code></a> executes, the value will be <code>true</code>.</p> | |
<h3>response.getHeader(name)<span><a class="mark" href="#http_response_getheader_name" id="http_response_getheader_name">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.4.0</span> | |
@@ -27051,7 +27006,7 @@ | |
</ul> | |
<p>Reads out a header that's already been queued but not sent to the client. | |
Note that the name is case insensitive. The type of the return value depends | |
-on the arguments provided to <a href="#http2_response_setheader_name_value"><code>response.setHeader()</code></a>.</p> | |
+on the arguments provided to <a href="#http_response_setheader_name_value"><code>response.setHeader()</code></a>.</p> | |
<p>Example:</p> | |
<pre><code class="lang-js">response.setHeader('Content-Type', 'text/html'); | |
response.setHeader('Content-Length', Buffer.byteLength(body)); | |
@@ -27159,10 +27114,10 @@ | |
<pre><code class="lang-js">response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']); | |
</code></pre> | |
<p>Attempting to set a header field name or value that contains invalid characters | |
-will result in a <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> being thrown.</p> | |
-<p>When headers have been set with <a href="#http2_response_setheader_name_value"><code>response.setHeader()</code></a>, they will be merged | |
-with any headers passed to <a href="#http2_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a>, with the headers passed | |
-to <a href="#http2_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a> given precedence.</p> | |
+will result in a <a href="#errors_class_typeerror"><code>TypeError</code></a> being thrown.</p> | |
+<p>When headers have been set with <a href="#http_response_setheader_name_value"><code>response.setHeader()</code></a>, they will be merged | |
+with any headers passed to <a href="#http_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a>, with the headers passed | |
+to <a href="#http_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a> given precedence.</p> | |
<pre><code class="lang-js">// returns content-type = text/plain | |
const server = http.createServer((req, res) => { | |
res.setHeader('Content-Type', 'text/html'); | |
@@ -27171,19 +27126,19 @@ | |
res.end('ok'); | |
}); | |
</code></pre> | |
-<p>If <a href="#http2_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a> method is called and this method has not been | |
+<p>If <a href="#http_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a> method is called and this method has not been | |
called, it will directly write the supplied header values onto the network | |
channel without caching internally, and the <a href="#http_response_getheader_name"><code>response.getHeader()</code></a> on the | |
header will not yield the expected result. If progressive population of headers | |
is desired with potential future retrieval and modification, use | |
-<a href="#http2_response_setheader_name_value"><code>response.setHeader()</code></a> instead of <a href="#http2_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a>.</p> | |
+<a href="#http_response_setheader_name_value"><code>response.setHeader()</code></a> instead of <a href="#http_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a>.</p> | |
<h3>response.setTimeout(msecs[, callback])<span><a class="mark" href="#http_response_settimeout_msecs_callback" id="http_response_settimeout_msecs_callback">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.9.12</span> | |
</div><ul> | |
<li><code>msecs</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
-<li>Returns: <a href="http.html#http_class_http_serverresponse" class="type"><http.ServerResponse></a></li> | |
+<li>Returns: <a href="#http_class_http_serverresponse" class="type"><http.ServerResponse></a></li> | |
</ul> | |
<p>Sets the Socket's timeout value to <code>msecs</code>. If a callback is | |
provided, then it is added as a listener on the <code>'timeout'</code> event on | |
@@ -27196,7 +27151,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.3.0</span> | |
</div><ul> | |
-<li><a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li><a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
</ul> | |
<p>Reference to the underlying socket. Usually users will not want to access | |
this property. In particular, the socket will not emit <code>'readable'</code> events | |
@@ -27217,7 +27172,7 @@ | |
</div><ul> | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
</ul> | |
-<p>When using implicit headers (not calling <a href="#http2_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a> explicitly), | |
+<p>When using implicit headers (not calling <a href="#http_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a> explicitly), | |
this property controls the status code that will be sent to the client when | |
the headers get flushed.</p> | |
<p>Example:</p> | |
@@ -27231,7 +27186,7 @@ | |
</div><ul> | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
-<p>When using implicit headers (not calling <a href="#http2_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a> explicitly), | |
+<p>When using implicit headers (not calling <a href="#http_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a> explicitly), | |
this property controls the status message that will be sent to the client when | |
the headers get flushed. If this is left as <code>undefined</code> then the standard | |
message for the status code will be used.</p> | |
@@ -27244,12 +27199,12 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.29</span> | |
</div><ul> | |
-<li><code>chunk</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>chunk</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> <strong>Default:</strong> <code>'utf8'</code></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
</ul> | |
-<p>If this method is called and <a href="#http2_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a> has not been called, | |
+<p>If this method is called and <a href="#http_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a> has not been called, | |
it will switch to implicit header mode and flush the implicit headers.</p> | |
<p>This sends a chunk of the response body. This method may | |
be called multiple times to provide successive parts of the body.</p> | |
@@ -27261,9 +27216,9 @@ | |
<code>callback</code> will be called when this chunk of data is flushed.</p> | |
<p>This is the raw HTTP body and has nothing to do with higher-level multi-part | |
body encodings that may be used.</p> | |
-<p>The first time <a href="#http2_response_write_chunk_encoding_callback"><code>response.write()</code></a> is called, it will send the buffered | |
+<p>The first time <a href="#http_response_write_chunk_encoding_callback"><code>response.write()</code></a> is called, it will send the buffered | |
header information and the first chunk of the body to the client. The second | |
-time <a href="#http2_response_write_chunk_encoding_callback"><code>response.write()</code></a> is called, Node.js assumes data will be streamed, | |
+time <a href="#http_response_write_chunk_encoding_callback"><code>response.write()</code></a> is called, Node.js assumes data will be streamed, | |
and sends the new data separately. That is, the response is buffered up to the | |
first chunk of the body.</p> | |
<p>Returns <code>true</code> if the entire data was flushed successfully to the kernel | |
@@ -27273,7 +27228,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.3.0</span> | |
</div><p>Sends a HTTP/1.1 100 Continue message to the client, indicating that | |
-the request body should be sent. See the <a href="#http2_event_checkcontinue"><code>'checkContinue'</code></a> event on | |
+the request body should be sent. See the <a href="#http_event_checkcontinue"><code>'checkContinue'</code></a> event on | |
<code>Server</code>.</p> | |
<h3>response.writeHead(statusCode[, statusMessage][, headers])<span><a class="mark" href="#http_response_writehead_statuscode_statusmessage_headers" id="http_response_writehead_statuscode_statusmessage_headers">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -27304,18 +27259,18 @@ | |
'Content-Type': 'text/plain' }); | |
</code></pre> | |
<p>This method must only be called once on a message and it must | |
-be called before <a href="#http2_response_end_data_encoding_callback"><code>response.end()</code></a> is called.</p> | |
-<p>If <a href="#http2_response_write_chunk_encoding_callback"><code>response.write()</code></a> or <a href="#http2_response_end_data_encoding_callback"><code>response.end()</code></a> are called before calling | |
+be called before <a href="#http_response_end_data_encoding_callback"><code>response.end()</code></a> is called.</p> | |
+<p>If <a href="#http_response_write_chunk_encoding_callback"><code>response.write()</code></a> or <a href="#http_response_end_data_encoding_callback"><code>response.end()</code></a> are called before calling | |
this, the implicit/mutable headers will be calculated and call this function.</p> | |
-<p>When headers have been set with <a href="#http2_response_setheader_name_value"><code>response.setHeader()</code></a>, they will be merged | |
-with any headers passed to <a href="#http2_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a>, with the headers passed | |
-to <a href="#http2_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a> given precedence.</p> | |
-<p>If this method is called and <a href="#http2_response_setheader_name_value"><code>response.setHeader()</code></a> has not been called, | |
+<p>When headers have been set with <a href="#http_response_setheader_name_value"><code>response.setHeader()</code></a>, they will be merged | |
+with any headers passed to <a href="#http_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a>, with the headers passed | |
+to <a href="#http_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a> given precedence.</p> | |
+<p>If this method is called and <a href="#http_response_setheader_name_value"><code>response.setHeader()</code></a> has not been called, | |
it will directly write the supplied header values onto the network channel | |
without caching internally, and the <a href="#http_response_getheader_name"><code>response.getHeader()</code></a> on the header | |
will not yield the expected result. If progressive population of headers is | |
desired with potential future retrieval and modification, use | |
-<a href="#http2_response_setheader_name_value"><code>response.setHeader()</code></a> instead.</p> | |
+<a href="#http_response_setheader_name_value"><code>response.setHeader()</code></a> instead.</p> | |
<pre><code class="lang-js">// returns content-type = text/plain | |
const server = http.createServer((req, res) => { | |
res.setHeader('Content-Type', 'text/html'); | |
@@ -27331,7 +27286,7 @@ | |
And Node.js does not check whether Content-Length and the length of the body | |
which has been transmitted are equal or not.</p> | |
<p>Attempting to set a header field name or value that contains invalid characters | |
-will result in a <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> being thrown.</p> | |
+will result in a <a href="#errors_class_typeerror"><code>TypeError</code></a> being thrown.</p> | |
<h3>response.writeProcessing()<span><a class="mark" href="#http_response_writeprocessing" id="http_response_writeprocessing">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
@@ -27340,11 +27295,11 @@ | |
<h2>Class: http.IncomingMessage<span><a class="mark" href="#http_class_http_incomingmessage" id="http_class_http_incomingmessage">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.17</span> | |
-</div><p>An <code>IncomingMessage</code> object is created by <a href="http.html#http_class_http_server"><code>http.Server</code></a> or | |
-<a href="#http_class_http_clientrequest"><code>http.ClientRequest</code></a> and passed as the first argument to the <a href="#http2_event_request"><code>'request'</code></a> | |
+</div><p>An <code>IncomingMessage</code> object is created by <a href="#http_class_http_server"><code>http.Server</code></a> or | |
+<a href="#http_class_http_clientrequest"><code>http.ClientRequest</code></a> and passed as the first argument to the <a href="#http_event_request"><code>'request'</code></a> | |
and <a href="#http_event_response"><code>'response'</code></a> event respectively. It may be used to access response | |
status, headers and data.</p> | |
-<p>It implements the <a href="stream.html#stream_class_stream_readable">Readable Stream</a> interface, as well as the | |
+<p>It implements the <a href="#stream_class_stream_readable">Readable Stream</a> interface, as well as the | |
following additional events, methods, and properties.</p> | |
<h3>Event: 'aborted'<span><a class="mark" href="#http_event_aborted" id="http_event_aborted">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -27414,7 +27369,7 @@ | |
</div><ul> | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
-<p><strong>Only valid for request obtained from <a href="http.html#http_class_http_server"><code>http.Server</code></a>.</strong></p> | |
+<p><strong>Only valid for request obtained from <a href="#http_class_http_server"><code>http.Server</code></a>.</strong></p> | |
<p>The request method as a string. Read only. Example: | |
<code>'GET'</code>, <code>'DELETE'</code>.</p> | |
<h3>message.rawHeaders<span><a class="mark" href="#http_message_rawheaders" id="http_message_rawheaders">#</a></span></h3> | |
@@ -27454,17 +27409,17 @@ | |
</div><ul> | |
<li><code>msecs</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
-<li>Returns: <a href="http.html#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a></li> | |
+<li>Returns: <a href="#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a></li> | |
</ul> | |
<p>Calls <code>message.connection.setTimeout(msecs, callback)</code>.</p> | |
<h3>message.socket<span><a class="mark" href="#http_message_socket" id="http_message_socket">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.3.0</span> | |
</div><ul> | |
-<li><a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li><a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
</ul> | |
-<p>The <a href="net.html#net_class_net_socket"><code>net.Socket</code></a> object associated with the connection.</p> | |
-<p>With HTTPS support, use <a href="tls.html#tls_tlssocket_getpeercertificate_detailed"><code>request.socket.getPeerCertificate()</code></a> to obtain the | |
+<p>The <a href="#net_class_net_socket"><code>net.Socket</code></a> object associated with the connection.</p> | |
+<p>With HTTPS support, use <a href="#tls_tlssocket_getpeercertificate_detailed"><code>request.socket.getPeerCertificate()</code></a> to obtain the | |
client's authentication details.</p> | |
<h3>message.statusCode<span><a class="mark" href="#http_message_statuscode" id="http_message_statuscode">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -27496,7 +27451,7 @@ | |
</div><ul> | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
-<p><strong>Only valid for request obtained from <a href="http.html#http_class_http_server"><code>http.Server</code></a>.</strong></p> | |
+<p><strong>Only valid for request obtained from <a href="#http_class_http_server"><code>http.Server</code></a>.</strong></p> | |
<p>Request URL string. This contains only the URL that is | |
present in the actual HTTP request. If the request is:</p> | |
<pre><code class="lang-txt">GET /status?name=ryan HTTP/1.1\r\n | |
@@ -27576,22 +27531,22 @@ | |
</details> | |
</div><ul> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
-<li><code>IncomingMessage</code> <a href="http.html#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a> Specifies the <code>IncomingMessage</code> | |
+<li><code>IncomingMessage</code> <a href="#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a> Specifies the <code>IncomingMessage</code> | |
class to be used. Useful for extending the original <code>IncomingMessage</code>. | |
<strong>Default:</strong> <code>IncomingMessage</code>.</li> | |
-<li><code>ServerResponse</code> <a href="http.html#http_class_http_serverresponse" class="type"><http.ServerResponse></a> Specifies the <code>ServerResponse</code> class | |
+<li><code>ServerResponse</code> <a href="#http_class_http_serverresponse" class="type"><http.ServerResponse></a> Specifies the <code>ServerResponse</code> class | |
to be used. Useful for extending the original <code>ServerResponse</code>. <strong>Default:</strong> | |
<code>ServerResponse</code>.</li> | |
</ul> | |
</li> | |
<li><p><code>requestListener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></p> | |
</li> | |
-<li><p>Returns: <a href="http.html#http_class_http_server" class="type"><http.Server></a></p> | |
+<li><p>Returns: <a href="#http_class_http_server" class="type"><http.Server></a></p> | |
</li> | |
</ul> | |
-<p>Returns a new instance of <a href="http.html#http_class_http_server"><code>http.Server</code></a>.</p> | |
+<p>Returns a new instance of <a href="#http_class_http_server"><code>http.Server</code></a>.</p> | |
<p>The <code>requestListener</code> is a function which is automatically | |
-added to the <a href="#http2_event_request"><code>'request'</code></a> event.</p> | |
+added to the <a href="#http_event_request"><code>'request'</code></a> event.</p> | |
<h2>http.get(options[, callback])<span><a class="mark" href="#http_http_get_options_callback" id="http_http_get_options_callback">#</a></span></h2> | |
<div class="api_metadata"> | |
<details class="changelog"><summary>History</summary> | |
@@ -27606,15 +27561,15 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> Accepts the same <code>options</code> as | |
-<a href="http.html#http_http_request_options_callback"><code>http.request()</code></a>, with the <code>method</code> always set to <code>GET</code>. | |
+<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> Accepts the same <code>options</code> as | |
+<a href="#http_http_request_options_callback"><code>http.request()</code></a>, with the <code>method</code> always set to <code>GET</code>. | |
Properties that are inherited from the prototype are ignored.</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
-<li>Returns: <a href="http.html#http_class_http_clientrequest" class="type"><http.ClientRequest></a></li> | |
+<li>Returns: <a href="#http_class_http_clientrequest" class="type"><http.ClientRequest></a></li> | |
</ul> | |
<p>Since most requests are GET requests without bodies, Node.js provides this | |
convenience method. The only difference between this method and | |
-<a href="http.html#http_http_request_options_callback"><code>http.request()</code></a> is that it sets the method to GET and calls <code>req.end()</code> | |
+<a href="#http_http_request_options_callback"><code>http.request()</code></a> is that it sets the method to GET and calls <code>req.end()</code> | |
automatically. Note that the callback must take care to consume the response | |
data for reasons stated in <a href="#http_class_http_clientrequest"><code>http.ClientRequest</code></a> section.</p> | |
<p>The <code>callback</code> is invoked with a single argument that is an instance of | |
@@ -27658,7 +27613,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.5.9</span> | |
</div><ul> | |
-<li><a href="http.html#http_class_http_agent" class="type"><http.Agent></a></li> | |
+<li><a href="#http_class_http_agent" class="type"><http.Agent></a></li> | |
</ul> | |
<p>Global instance of <code>Agent</code> which is used as the default for all HTTP client | |
requests.</p> | |
@@ -27676,7 +27631,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a><ul> | |
+<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a><ul> | |
<li><code>protocol</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Protocol to use. <strong>Default:</strong> <code>'http:'</code>.</li> | |
<li><code>host</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> A domain name or IP address of the server to issue the | |
request to. <strong>Default:</strong> <code>'localhost'</code>.</li> | |
@@ -27698,7 +27653,7 @@ | |
<li><code>headers</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> An object containing request headers.</li> | |
<li><code>auth</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Basic authentication i.e. <code>'user:password'</code> to compute an | |
Authorization header.</li> | |
-<li><code>agent</code> <a href="http.html#http_class_http_agent" class="type"><http.Agent></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> Controls <a href="#https_class_https_agent"><code>Agent</code></a> behavior. Possible | |
+<li><code>agent</code> <a href="#http_class_http_agent" class="type"><http.Agent></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> Controls <a href="#http_class_http_agent"><code>Agent</code></a> behavior. Possible | |
values:<ul> | |
<li><code>undefined</code> (default): use <a href="#http_http_globalagent"><code>http.globalAgent</code></a> for this host and port.</li> | |
<li><code>Agent</code> object: explicitly use the passed in <code>Agent</code>.</li> | |
@@ -27717,12 +27672,12 @@ | |
</ul> | |
</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
-<li>Returns: <a href="http.html#http_class_http_clientrequest" class="type"><http.ClientRequest></a></li> | |
+<li>Returns: <a href="#http_class_http_clientrequest" class="type"><http.ClientRequest></a></li> | |
</ul> | |
<p>Node.js maintains several connections per server to make HTTP requests. | |
This function allows one to transparently issue requests.</p> | |
-<p><code>options</code> can be an object, a string, or a <a href="url.html#url_class_url"><code>URL</code></a> object. If <code>options</code> is a | |
-string, it is automatically parsed with <a href="#url_constructor_new_url_input_base"><code>new URL()</code></a>. If it is a <a href="url.html#url_class_url"><code>URL</code></a> | |
+<p><code>options</code> can be an object, a string, or a <a href="#url_the_whatwg_url_api"><code>URL</code></a> object. If <code>options</code> is a | |
+string, it is automatically parsed with <a href="#url_constructor_new_url_input_base"><code>new URL()</code></a>. If it is a <a href="#url_the_whatwg_url_api"><code>URL</code></a> | |
object, it will be automatically converted to an ordinary <code>options</code> object.</p> | |
<p>The optional <code>callback</code> parameter will be added as a one-time listener for | |
the <a href="#http_event_response"><code>'response'</code></a> event.</p> | |
@@ -27788,7 +27743,7 @@ | |
to compute basic authentication.</p> | |
</li> | |
</ul> | |
-<p>Example using a <a href="url.html#url_class_url"><code>URL</code></a> as <code>options</code>:</p> | |
+<p>Example using a <a href="#url_the_whatwg_url_api"><code>URL</code></a> as <code>options</code>:</p> | |
<pre><code class="lang-js">const options = new URL('http://abc:[email protected]'); | |
const req = http.request(options, (res) => { | |
@@ -27843,11 +27798,9 @@ | |
</ul> | |
<p>Note that setting the <code>timeout</code> option or using the <code>setTimeout()</code> function will | |
not abort the request or do anything besides add a <code>'timeout'</code> event.</p> | |
-<!-- [end-include:http.md] --> | |
-<!-- [start-include:http2.md] --> | |
<h1>HTTP/2<span><a class="mark" href="#http2_http_2" id="http2_http_2">#</a></span></h1> | |
<!--introduced_in=v8.4.0--> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>The <code>http2</code> module provides an implementation of the <a href="https://tools.ietf.org/html/rfc7540">HTTP/2</a> protocol. It | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>The <code>http2</code> module provides an implementation of the <a href="https://tools.ietf.org/html/rfc7540">HTTP/2</a> protocol. It | |
can be accessed using:</p> | |
<pre><code class="lang-js">const http2 = require('http2'); | |
</code></pre> | |
@@ -27919,7 +27872,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li>Extends: <a href="events.html#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
+<li>Extends: <a href="#events_class_eventemitter" class="type"><EventEmitter></a></li> | |
</ul> | |
<p>Instances of the <code>http2.Http2Session</code> class represent an active communications | |
session between an HTTP/2 client and server. Instances of this class are <em>not</em> | |
@@ -27932,7 +27885,7 @@ | |
actions typically taken through interactions with either the <code>Http2Server</code> or | |
<code>Http2Stream</code> objects.</p> | |
<h4><code>Http2Session</code> and Sockets<span><a class="mark" href="#http2_http2session_and_sockets" id="http2_http2session_and_sockets">#</a></span></h4> | |
-<p>Every <code>Http2Session</code> instance is associated with exactly one <a href="net.html#net_class_net_socket"><code>net.Socket</code></a> or | |
+<p>Every <code>Http2Session</code> instance is associated with exactly one <a href="#net_class_net_socket"><code>net.Socket</code></a> or | |
<a href="#tls_class_tls_tlssocket"><code>tls.TLSSocket</code></a> when it is created. When either the <code>Socket</code> or the | |
<code>Http2Session</code> are destroyed, both will be destroyed.</p> | |
<p>Because the of the specific serialization and processing requirements imposed | |
@@ -27951,8 +27904,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><code>session</code> <a href="http2.html#http2_class_http2session" class="type"><Http2Session></a></li> | |
-<li><code>socket</code> <a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li><code>session</code> <a href="#http2_class_http2session" class="type"><Http2Session></a></li> | |
+<li><code>socket</code> <a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
</ul> | |
<p>The <code>'connect'</code> event is emitted once the <code>Http2Session</code> has been successfully | |
connected to the remote peer and communication may begin.</p> | |
@@ -27989,7 +27942,7 @@ | |
<li><code>errorCode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> The HTTP/2 error code specified in the <code>GOAWAY</code> frame.</li> | |
<li><code>lastStreamID</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> The ID of the last stream the remote peer successfully | |
processed (or <code>0</code> if no ID is specified).</li> | |
-<li><code>opaqueData</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> If additional opaque data was included in the <code>GOAWAY</code> | |
+<li><code>opaqueData</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> If additional opaque data was included in the <code>GOAWAY</code> | |
frame, a <code>Buffer</code> instance will be passed containing that data.</li> | |
</ul> | |
<p>The <code>'goaway'</code> event is emitted when a <code>GOAWAY</code> frame is received.</p> | |
@@ -27999,7 +27952,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><code>settings</code> <a href="http2.html#http2_settings_object" class="type"><HTTP/2 Settings Object></a> A copy of the <code>SETTINGS</code> frame received.</li> | |
+<li><code>settings</code> <a href="#http2_settings_object" class="type"><HTTP/2 Settings Object></a> A copy of the <code>SETTINGS</code> frame received.</li> | |
</ul> | |
<p>The <code>'localSettings'</code> event is emitted when an acknowledgment <code>SETTINGS</code> frame | |
has been received.</p> | |
@@ -28015,7 +27968,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><code>settings</code> <a href="http2.html#http2_settings_object" class="type"><HTTP/2 Settings Object></a> A copy of the <code>SETTINGS</code> frame received.</li> | |
+<li><code>settings</code> <a href="#http2_settings_object" class="type"><HTTP/2 Settings Object></a> A copy of the <code>SETTINGS</code> frame received.</li> | |
</ul> | |
<p>The <code>'remoteSettings'</code> event is emitted when a new <code>SETTINGS</code> frame is received | |
from the connected peer.</p> | |
@@ -28027,8 +27980,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><code>stream</code> <a href="http2.html#http2_class_http2stream" class="type"><Http2Stream></a> A reference to the stream</li> | |
-<li><code>headers</code> <a href="http2.html#http2_headers_object" class="type"><HTTP/2 Headers Object></a> An object describing the headers</li> | |
+<li><code>stream</code> <a href="#http2_class_http2stream" class="type"><Http2Stream></a> A reference to the stream</li> | |
+<li><code>headers</code> <a href="#http2_headers_object" class="type"><HTTP/2 Headers Object></a> An object describing the headers</li> | |
<li><code>flags</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> The associated numeric flags</li> | |
<li><code>rawHeaders</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="type"><Array></a> An array containing the raw header names followed by | |
their respective values.</li> | |
@@ -28155,7 +28108,7 @@ | |
</div><ul> | |
<li><code>code</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> An HTTP/2 error code</li> | |
<li><code>lastStreamID</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> The numeric ID of the last processed <code>Http2Stream</code></li> | |
-<li><code>opaqueData</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a> A <code>TypedArray</code> or <code>DataView</code> | |
+<li><code>opaqueData</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a> A <code>TypedArray</code> or <code>DataView</code> | |
instance containing additional data to be carried within the <code>GOAWAY</code> frame.</li> | |
</ul> | |
<p>Transmits a <code>GOAWAY</code> frame to the connected peer <em>without</em> shutting down the | |
@@ -28164,7 +28117,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><a href="http2.html#http2_settings_object" class="type"><HTTP/2 Settings Object></a></li> | |
+<li><a href="#http2_settings_object" class="type"><HTTP/2 Settings Object></a></li> | |
</ul> | |
<p>A prototype-less object describing the current local settings of this | |
<code>Http2Session</code>. The local settings are local to <em>this</em> <code>Http2Session</code> instance.</p> | |
@@ -28191,7 +28144,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.9.3</span> | |
</div><ul> | |
-<li><code>payload</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a> Optional ping payload.</li> | |
+<li><code>payload</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" class="type"><TypedArray></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" class="type"><DataView></a> Optional ping payload.</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
</ul> | |
@@ -28220,13 +28173,13 @@ | |
<h4>http2session.ref()<span><a class="mark" href="#http2_http2session_ref" id="http2_http2session_ref">#</a></span></h4> | |
<div class="api_metadata"> | |
<span>Added in: v9.4.0</span> | |
-</div><p>Calls <a href="net.html#net_socket_ref"><code>ref()</code></a> on this <code>Http2Session</code> | |
-instance's underlying <a href="net.html#net_class_net_socket"><code>net.Socket</code></a>.</p> | |
+</div><p>Calls <a href="#net_socket_ref"><code>ref()</code></a> on this <code>Http2Session</code> | |
+instance's underlying <a href="#net_class_net_socket"><code>net.Socket</code></a>.</p> | |
<h4>http2session.remoteSettings<span><a class="mark" href="#http2_http2session_remotesettings" id="http2_http2session_remotesettings">#</a></span></h4> | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><a href="http2.html#http2_settings_object" class="type"><HTTP/2 Settings Object></a></li> | |
+<li><a href="#http2_settings_object" class="type"><HTTP/2 Settings Object></a></li> | |
</ul> | |
<p>A prototype-less object describing the current remote settings of this | |
<code>Http2Session</code>. The remote settings are set by the <em>connected</em> HTTP/2 peer.</p> | |
@@ -28244,7 +28197,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><a href="net.html#net_class_net_socket" class="type"><net.Socket></a> | <a href="tls.html#tls_class_tls_tlssocket" class="type"><tls.TLSSocket></a></li> | |
+<li><a href="#net_class_net_socket" class="type"><net.Socket></a> | <a href="#tls_class_tls_tlssocket" class="type"><tls.TLSSocket></a></li> | |
</ul> | |
<p>Returns a <code>Proxy</code> object that acts as a <code>net.Socket</code> (or <code>tls.TLSSocket</code>) but | |
limits available methods to ones safe to use with HTTP/2.</p> | |
@@ -28286,7 +28239,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><code>settings</code> <a href="http2.html#http2_settings_object" class="type"><HTTP/2 Settings Object></a></li> | |
+<li><code>settings</code> <a href="#http2_settings_object" class="type"><HTTP/2 Settings Object></a></li> | |
</ul> | |
<p>Updates the current local settings for this <code>Http2Session</code> and sends a new | |
<code>SETTINGS</code> frame to the connected HTTP/2 peer.</p> | |
@@ -28309,8 +28262,8 @@ | |
<h4>http2session.unref()<span><a class="mark" href="#http2_http2session_unref" id="http2_http2session_unref">#</a></span></h4> | |
<div class="api_metadata"> | |
<span>Added in: v9.4.0</span> | |
-</div><p>Calls <a href="net.html#net_socket_unref"><code>unref()</code></a> on this <code>Http2Session</code> | |
-instance's underlying <a href="net.html#net_class_net_socket"><code>net.Socket</code></a>.</p> | |
+</div><p>Calls <a href="#net_socket_unref"><code>unref()</code></a> on this <code>Http2Session</code> | |
+instance's underlying <a href="#net_class_net_socket"><code>net.Socket</code></a>.</p> | |
<h3>Class: ServerHttp2Session<span><a class="mark" href="#http2_class_serverhttp2session" id="http2_class_serverhttp2session">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
@@ -28320,7 +28273,7 @@ | |
</div><ul> | |
<li><code>alt</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> A description of the alternative service configuration as | |
defined by <a href="https://tools.ietf.org/html/rfc7838">RFC 7838</a>.</li> | |
-<li><code>originOrStream</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> Either a URL string specifying | |
+<li><code>originOrStream</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> Either a URL string specifying | |
the origin (or an <code>Object</code> with an <code>origin</code> property) or the numeric | |
identifier of an active <code>Http2Stream</code> as given by the <code>http2stream.id</code> | |
property.</li> | |
@@ -28395,7 +28348,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><code>headers</code> <a href="http2.html#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
+<li><code>headers</code> <a href="#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
<li><p><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></p> | |
<ul> | |
<li><code>endStream</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> <code>true</code> if the <code>Http2Stream</code> <em>writable</em> side should | |
@@ -28414,7 +28367,7 @@ | |
<code>'wantTrailers'</code> event after the final <code>DATA</code> frame has been sent.</li> | |
</ul> | |
</li> | |
-<li><p>Returns: <a href="http2.html#http2_class_clienthttp2stream" class="type"><ClientHttp2Stream></a></p> | |
+<li><p>Returns: <a href="#http2_class_clienthttp2stream" class="type"><ClientHttp2Stream></a></p> | |
</li> | |
</ul> | |
<p>For HTTP/2 Client <code>Http2Session</code> instances only, the <code>http2session.request()</code> | |
@@ -28454,7 +28407,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li>Extends: <a href="stream.html#stream_class_stream_duplex" class="type"><stream.Duplex></a></li> | |
+<li>Extends: <a href="#stream_class_stream_duplex" class="type"><stream.Duplex></a></li> | |
</ul> | |
<p>Each instance of the <code>Http2Stream</code> class represents a bidirectional HTTP/2 | |
communications stream over an <code>Http2Session</code> instance. Any single <code>Http2Session</code> | |
@@ -28641,14 +28594,14 @@ | |
<div class="api_metadata"> | |
<span>Added in: v9.5.0</span> | |
</div><ul> | |
-<li><a href="http2.html#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
+<li><a href="#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
</ul> | |
<p>An object containing the outbound headers sent for this <code>Http2Stream</code>.</p> | |
<h4>http2stream.sentInfoHeaders<span><a class="mark" href="#http2_http2stream_sentinfoheaders" id="http2_http2stream_sentinfoheaders">#</a></span></h4> | |
<div class="api_metadata"> | |
<span>Added in: v9.5.0</span> | |
</div><ul> | |
-<li><a href="http2.html#http2_headers_object" class="type"><HTTP/2 Headers Object[]></a></li> | |
+<li><a href="#http2_headers_object" class="type"><HTTP/2 Headers Object[]></a></li> | |
</ul> | |
<p>An array of objects containing the outbound informational (additional) headers | |
sent for this <code>Http2Stream</code>.</p> | |
@@ -28656,14 +28609,14 @@ | |
<div class="api_metadata"> | |
<span>Added in: v9.5.0</span> | |
</div><ul> | |
-<li><a href="http2.html#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
+<li><a href="#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
</ul> | |
<p>An object containing the outbound trailers sent for this this <code>HttpStream</code>.</p> | |
<h4>http2stream.session<span><a class="mark" href="#http2_http2stream_session" id="http2_http2stream_session">#</a></span></h4> | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><a href="http2.html#http2_class_http2session" class="type"><Http2Session></a></li> | |
+<li><a href="#http2_class_http2session" class="type"><Http2Session></a></li> | |
</ul> | |
<p>A reference to the <code>Http2Session</code> instance that owns this <code>Http2Stream</code>. The | |
value will be <code>undefined</code> after the <code>Http2Stream</code> instance is destroyed.</p> | |
@@ -28708,7 +28661,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>headers</code> <a href="http2.html#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
+<li><code>headers</code> <a href="#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
</ul> | |
<p>Sends a trailing <code>HEADERS</code> frame to the connected HTTP/2 peer. This method | |
will cause the <code>Http2Stream</code> to be immediately closed and must only be | |
@@ -28732,7 +28685,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li>Extends <a href="http2.html#http2_class_http2stream" class="type"><Http2Stream></a></li> | |
+<li>Extends <a href="#http2_class_http2stream" class="type"><Http2Stream></a></li> | |
</ul> | |
<p>The <code>ClientHttp2Stream</code> class is an extension of <code>Http2Stream</code> that is | |
used exclusively on HTTP/2 Clients. <code>Http2Stream</code> instances on the client | |
@@ -28783,7 +28736,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li>Extends: <a href="http2.html#http2_class_http2stream" class="type"><Http2Stream></a></li> | |
+<li>Extends: <a href="#http2_class_http2stream" class="type"><Http2Stream></a></li> | |
</ul> | |
<p>The <code>ServerHttp2Stream</code> class is an extension of <a href="#http2_class_http2stream"><code>Http2Stream</code></a> that is | |
used exclusively on HTTP/2 Servers. <code>Http2Stream</code> instances on the server | |
@@ -28793,7 +28746,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><code>headers</code> <a href="http2.html#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
+<li><code>headers</code> <a href="#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
</ul> | |
<p>Sends an additional informational <code>HEADERS</code> frame to the connected HTTP/2 peer.</p> | |
<h4>http2stream.headersSent<span><a class="mark" href="#http2_http2stream_headerssent" id="http2_http2stream_headerssent">#</a></span></h4> | |
@@ -28817,7 +28770,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><code>headers</code> <a href="http2.html#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
+<li><code>headers</code> <a href="#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>exclusive</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> When <code>true</code> and <code>parent</code> identifies a parent Stream, | |
the created stream is made the sole direct dependency of the parent, with | |
@@ -28830,8 +28783,8 @@ | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Callback that is called once the push stream has been | |
initiated.<ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
-<li><code>pushStream</code> <a href="http2.html#http2_class_serverhttp2stream" class="type"><ServerHttp2Stream></a> The returned <code>pushStream</code> object.</li> | |
-<li><code>headers</code> <a href="http2.html#http2_headers_object" class="type"><HTTP/2 Headers Object></a> Headers object the <code>pushStream</code> was | |
+<li><code>pushStream</code> <a href="#http2_class_serverhttp2stream" class="type"><ServerHttp2Stream></a> The returned <code>pushStream</code> object.</li> | |
+<li><code>headers</code> <a href="#http2_headers_object" class="type"><HTTP/2 Headers Object></a> Headers object the <code>pushStream</code> was | |
initiated with.</li> | |
</ul> | |
</li> | |
@@ -28858,7 +28811,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><code>headers</code> <a href="http2.html#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
+<li><code>headers</code> <a href="#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>endStream</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> Set to <code>true</code> to indicate that the response will not | |
include payload data.</li> | |
@@ -28907,7 +28860,7 @@ | |
</details> | |
</div><ul> | |
<li><code>fd</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> A readable file descriptor.</li> | |
-<li><code>headers</code> <a href="http2.html#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
+<li><code>headers</code> <a href="#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>statCheck</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
<li><code>waitForTrailers</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> When <code>true</code>, the <code>Http2Stream</code> will emit the | |
@@ -28996,8 +28949,8 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
-<li><code>headers</code> <a href="http2.html#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
+<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>headers</code> <a href="#http2_headers_object" class="type"><HTTP/2 Headers Object></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>statCheck</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
<li><code>onError</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Callback function invoked in the case of an | |
@@ -29089,7 +29042,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li>Extends: <a href="net.html#net_class_net_server" class="type"><net.Server></a></li> | |
+<li>Extends: <a href="#net_class_net_server" class="type"><net.Server></a></li> | |
</ul> | |
<p>In <code>Http2Server</code>, there are no <code>'clientError'</code> events as there are in | |
HTTP1. However, there are <code>'sessionError'</code>, and <code>'streamError'</code> events for | |
@@ -29098,8 +29051,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.5.0</span> | |
</div><ul> | |
-<li><code>request</code> <a href="http2.html#http2_class_http2_http2serverrequest" class="type"><http2.Http2ServerRequest></a></li> | |
-<li><code>response</code> <a href="http2.html#http2_class_http2_http2serverresponse" class="type"><http2.Http2ServerResponse></a></li> | |
+<li><code>request</code> <a href="#http2_class_http2_http2serverrequest" class="type"><http2.Http2ServerRequest></a></li> | |
+<li><code>response</code> <a href="#http2_class_http2_http2serverresponse" class="type"><http2.Http2ServerResponse></a></li> | |
</ul> | |
<p>If a <a href="#http2_event_request"><code>'request'</code></a> listener is registered or <a href="#http2_http2_createserver_options_onrequesthandler"><code>http2.createServer()</code></a> is | |
supplied a callback function, the <code>'checkContinue'</code> event is emitted each time | |
@@ -29116,8 +29069,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><code>request</code> <a href="http2.html#http2_class_http2_http2serverrequest" class="type"><http2.Http2ServerRequest></a></li> | |
-<li><code>response</code> <a href="http2.html#http2_class_http2_http2serverresponse" class="type"><http2.Http2ServerResponse></a></li> | |
+<li><code>request</code> <a href="#http2_class_http2_http2serverrequest" class="type"><http2.Http2ServerRequest></a></li> | |
+<li><code>response</code> <a href="#http2_class_http2_http2serverresponse" class="type"><http2.Http2ServerResponse></a></li> | |
</ul> | |
<p>Emitted each time there is a request. Note that there may be multiple requests | |
per session. See the <a href="#http2_compatibility_api">Compatibility API</a>.</p> | |
@@ -29173,7 +29126,7 @@ | |
</div><ul> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
</ul> | |
-<p>Stops the server from accepting new connections. See <a href="net.html#net_server_close_callback"><code>net.Server.close()</code></a>.</p> | |
+<p>Stops the server from accepting new connections. See <a href="#net_server_close_callback"><code>net.Server.close()</code></a>.</p> | |
<p>Note that this is not analogous to restricting new requests since HTTP/2 | |
connections are persistent. To achieve a similar graceful shutdown behavior, | |
consider also using <a href="#http2_http2session_close_callback"><code>http2session.close()</code></a> on active sessions.</p> | |
@@ -29181,14 +29134,14 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li>Extends: <a href="tls.html#tls_class_tls_server" class="type"><tls.Server></a></li> | |
+<li>Extends: <a href="#tls_class_tls_server" class="type"><tls.Server></a></li> | |
</ul> | |
<h4>Event: 'checkContinue'<span><a class="mark" href="#http2_event_checkcontinue_1" id="http2_event_checkcontinue_1">#</a></span></h4> | |
<div class="api_metadata"> | |
<span>Added in: v8.5.0</span> | |
</div><ul> | |
-<li><code>request</code> <a href="http2.html#http2_class_http2_http2serverrequest" class="type"><http2.Http2ServerRequest></a></li> | |
-<li><code>response</code> <a href="http2.html#http2_class_http2_http2serverresponse" class="type"><http2.Http2ServerResponse></a></li> | |
+<li><code>request</code> <a href="#http2_class_http2_http2serverrequest" class="type"><http2.Http2ServerRequest></a></li> | |
+<li><code>response</code> <a href="#http2_class_http2_http2serverresponse" class="type"><http2.Http2ServerResponse></a></li> | |
</ul> | |
<p>If a <a href="#http2_event_request"><code>'request'</code></a> listener is registered or <a href="#http2_http2_createsecureserver_options_onrequesthandler"><code>http2.createSecureServer()</code></a> | |
is supplied a callback function, the <code>'checkContinue'</code> event is emitted each | |
@@ -29205,8 +29158,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><code>request</code> <a href="http2.html#http2_class_http2_http2serverrequest" class="type"><http2.Http2ServerRequest></a></li> | |
-<li><code>response</code> <a href="http2.html#http2_class_http2_http2serverresponse" class="type"><http2.Http2ServerResponse></a></li> | |
+<li><code>request</code> <a href="#http2_class_http2_http2serverrequest" class="type"><http2.Http2ServerRequest></a></li> | |
+<li><code>response</code> <a href="#http2_class_http2_http2serverresponse" class="type"><http2.Http2ServerResponse></a></li> | |
</ul> | |
<p>Emitted each time there is a request. Note that there may be multiple requests | |
per session. See the <a href="#http2_compatibility_api">Compatibility API</a>.</p> | |
@@ -29266,7 +29219,7 @@ | |
</div><ul> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
</ul> | |
-<p>Stops the server from accepting new connections. See <a href="tls.html#tls_server_close_callback"><code>tls.Server.close()</code></a>.</p> | |
+<p>Stops the server from accepting new connections. See <a href="#tls_server_close_callback"><code>tls.Server.close()</code></a>.</p> | |
<p>Note that this is not analogous to restricting new requests since HTTP/2 | |
connections are persistent. To achieve a similar graceful shutdown behavior, | |
consider also using <a href="#http2_http2session_close_callback"><code>http2session.close()</code></a> on active sessions.</p> | |
@@ -29337,26 +29290,26 @@ | |
<li><code>selectPadding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> When <code>options.paddingStrategy</code> is equal to | |
<code>http2.constants.PADDING_STRATEGY_CALLBACK</code>, provides the callback function | |
used to determine the padding. See <a href="#http2_using_options_selectpadding">Using <code>options.selectPadding()</code></a>.</li> | |
-<li><code>settings</code> <a href="http2.html#http2_settings_object" class="type"><HTTP/2 Settings Object></a> The initial settings to send to the | |
+<li><code>settings</code> <a href="#http2_settings_object" class="type"><HTTP/2 Settings Object></a> The initial settings to send to the | |
remote peer upon connection.</li> | |
-<li><code>Http1IncomingMessage</code> <a href="http.html#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a> Specifies the | |
+<li><code>Http1IncomingMessage</code> <a href="#http_class_http_incomingmessage" class="type"><http.IncomingMessage></a> Specifies the | |
<code>IncomingMessage</code> class to used for HTTP/1 fallback. Useful for extending | |
the original <code>http.IncomingMessage</code>. <strong>Default:</strong> <code>http.IncomingMessage</code>.</li> | |
-<li><code>Http1ServerResponse</code> <a href="http.html#http_class_http_serverresponse" class="type"><http.ServerResponse></a> Specifies the <code>ServerResponse</code> | |
+<li><code>Http1ServerResponse</code> <a href="#http_class_http_serverresponse" class="type"><http.ServerResponse></a> Specifies the <code>ServerResponse</code> | |
class to used for HTTP/1 fallback. Useful for extending the original | |
<code>http.ServerResponse</code>. <strong>Default:</strong> <code>http.ServerResponse</code>.</li> | |
-<li><code>Http2ServerRequest</code> <a href="http2.html#http2_class_http2_http2serverrequest" class="type"><http2.Http2ServerRequest></a> Specifies the | |
+<li><code>Http2ServerRequest</code> <a href="#http2_class_http2_http2serverrequest" class="type"><http2.Http2ServerRequest></a> Specifies the | |
<code>Http2ServerRequest</code> class to use. | |
Useful for extending the original <code>Http2ServerRequest</code>. | |
<strong>Default:</strong> <code>Http2ServerRequest</code>.</li> | |
-<li><code>Http2ServerResponse</code> <a href="http2.html#http2_class_http2_http2serverresponse" class="type"><http2.Http2ServerResponse></a> Specifies the | |
+<li><code>Http2ServerResponse</code> <a href="#http2_class_http2_http2serverresponse" class="type"><http2.Http2ServerResponse></a> Specifies the | |
<code>Http2ServerResponse</code> class to use. | |
Useful for extending the original <code>Http2ServerResponse</code>. | |
<strong>Default:</strong> <code>Http2ServerResponse</code>.</li> | |
</ul> | |
</li> | |
<li><code>onRequestHandler</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> See <a href="#http2_compatibility_api">Compatibility API</a></li> | |
-<li>Returns: <a href="http2.html#http2_class_http2server" class="type"><Http2Server></a></li> | |
+<li>Returns: <a href="#http2_class_http2server" class="type"><Http2Server></a></li> | |
</ul> | |
<p>Returns a <code>net.Server</code> instance that creates and manages <code>Http2Session</code> | |
instances.</p> | |
@@ -29450,14 +29403,14 @@ | |
<li><code>selectPadding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> When <code>options.paddingStrategy</code> is equal to | |
<code>http2.constants.PADDING_STRATEGY_CALLBACK</code>, provides the callback function | |
used to determine the padding. See <a href="#http2_using_options_selectpadding">Using <code>options.selectPadding()</code></a>.</li> | |
-<li><code>settings</code> <a href="http2.html#http2_settings_object" class="type"><HTTP/2 Settings Object></a> The initial settings to send to the | |
+<li><code>settings</code> <a href="#http2_settings_object" class="type"><HTTP/2 Settings Object></a> The initial settings to send to the | |
remote peer upon connection.</li> | |
<li>...: Any <a href="#tls_tls_createserver_options_secureconnectionlistener"><code>tls.createServer()</code></a> options can be provided. For | |
servers, the identity options (<code>pfx</code> or <code>key</code>/<code>cert</code>) are usually required.</li> | |
</ul> | |
</li> | |
<li><code>onRequestHandler</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> See <a href="#http2_compatibility_api">Compatibility API</a></li> | |
-<li>Returns: <a href="http2.html#http2_class_http2secureserver" class="type"><Http2SecureServer></a></li> | |
+<li>Returns: <a href="#http2_class_http2secureserver" class="type"><Http2SecureServer></a></li> | |
</ul> | |
<p>Returns a <code>tls.Server</code> instance that creates and manages <code>Http2Session</code> | |
instances.</p> | |
@@ -29498,7 +29451,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>authority</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a></li> | |
+<li><code>authority</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>maxDeflateDynamicTableSize</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Sets the maximum dynamic table size | |
for deflating header fields. <strong>Default:</strong> <code>4Kib</code>.</li> | |
@@ -29550,7 +29503,7 @@ | |
<li><code>selectPadding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> When <code>options.paddingStrategy</code> is equal to | |
<code>http2.constants.PADDING_STRATEGY_CALLBACK</code>, provides the callback function | |
used to determine the padding. See <a href="#http2_using_options_selectpadding">Using <code>options.selectPadding()</code></a>.</li> | |
-<li><code>settings</code> <a href="http2.html#http2_settings_object" class="type"><HTTP/2 Settings Object></a> The initial settings to send to the | |
+<li><code>settings</code> <a href="#http2_settings_object" class="type"><HTTP/2 Settings Object></a> The initial settings to send to the | |
remote peer upon connection.</li> | |
<li><code>createConnection</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> An optional callback that receives the <code>URL</code> | |
instance passed to <code>connect</code> and the <code>options</code> object, and returns any | |
@@ -29559,7 +29512,7 @@ | |
</ul> | |
</li> | |
<li><code>listener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
-<li>Returns: <a href="http2.html#http2_class_clienthttp2session" class="type"><ClientHttp2Session></a></li> | |
+<li>Returns: <a href="#http2_class_clienthttp2session" class="type"><ClientHttp2Session></a></li> | |
</ul> | |
<p>Returns a <code>ClientHttp2Session</code> instance.</p> | |
<pre><code class="lang-js">const http2 = require('http2'); | |
@@ -29661,7 +29614,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li>Returns: <a href="http2.html#http2_settings_object" class="type"><HTTP/2 Settings Object></a></li> | |
+<li>Returns: <a href="#http2_settings_object" class="type"><HTTP/2 Settings Object></a></li> | |
</ul> | |
<p>Returns an object containing the default settings for an <code>Http2Session</code> | |
instance. This method returns a new object instance every time it is called | |
@@ -29670,8 +29623,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><code>settings</code> <a href="http2.html#http2_settings_object" class="type"><HTTP/2 Settings Object></a></li> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>settings</code> <a href="#http2_settings_object" class="type"><HTTP/2 Settings Object></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
<p>Returns a <code>Buffer</code> instance containing serialized representation of the given | |
HTTP/2 settings as specified in the <a href="https://tools.ietf.org/html/rfc7540">HTTP/2</a> specification. This is intended | |
@@ -29687,8 +29640,8 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><code>buf</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> The packed settings.</li> | |
-<li>Returns: <a href="http2.html#http2_settings_object" class="type"><HTTP/2 Settings Object></a></li> | |
+<li><code>buf</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> The packed settings.</li> | |
+<li>Returns: <a href="#http2_settings_object" class="type"><HTTP/2 Settings Object></a></li> | |
</ul> | |
<p>Returns a <a href="#http2_settings_object">HTTP/2 Settings Object</a> containing the deserialized settings from | |
the given <code>Buffer</code> as generated by <code>http2.getPackedSettings()</code>.</p> | |
@@ -29969,7 +29922,7 @@ | |
<a href="#http2_class_http2secureserver"><code>http2.SecureServer</code></a> and passed as the first argument to the | |
<a href="#http2_event_request"><code>'request'</code></a> event. It may be used to access a request status, headers, and | |
data.</p> | |
-<p>It implements the <a href="stream.html#stream_class_stream_readable">Readable Stream</a> interface, as well as the | |
+<p>It implements the <a href="#stream_class_stream_readable">Readable Stream</a> interface, as well as the | |
following additional events, methods, and properties.</p> | |
<h4>Event: 'aborted'<span><a class="mark" href="#http2_event_aborted_1" id="http2_event_aborted_1">#</a></span></h4> | |
<div class="api_metadata"> | |
@@ -30082,7 +30035,7 @@ | |
</div><ul> | |
<li><code>msecs</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
-<li>Returns: <a href="http2.html#http2_class_http2_http2serverrequest" class="type"><http2.Http2ServerRequest></a></li> | |
+<li>Returns: <a href="#http2_class_http2_http2serverrequest" class="type"><http2.Http2ServerRequest></a></li> | |
</ul> | |
<p>Sets the <a href=""><code>Http2Stream</code></a>'s timeout value to <code>msecs</code>. If a callback is | |
provided, then it is added as a listener on the <code>'timeout'</code> event on | |
@@ -30095,7 +30048,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><a href="net.html#net_class_net_socket" class="type"><net.Socket></a> | <a href="tls.html#tls_class_tls_tlssocket" class="type"><tls.TLSSocket></a></li> | |
+<li><a href="#net_class_net_socket" class="type"><net.Socket></a> | <a href="#tls_class_tls_tlssocket" class="type"><tls.TLSSocket></a></li> | |
</ul> | |
<p>Returns a <code>Proxy</code> object that acts as a <code>net.Socket</code> (or <code>tls.TLSSocket</code>) but | |
applies getters, setters, and methods based on HTTP/2 logic.</p> | |
@@ -30108,13 +30061,13 @@ | |
<code>ERR_HTTP2_NO_SOCKET_MANIPULATION</code>. See <a href="#http2_http2session_and_sockets"><code>Http2Session</code> and Sockets</a> for | |
more information.</p> | |
<p>All other interactions will be routed directly to the socket. With TLS support, | |
-use <a href="tls.html#tls_tlssocket_getpeercertificate_detailed"><code>request.socket.getPeerCertificate()</code></a> to obtain the client's | |
+use <a href="#tls_tlssocket_getpeercertificate_detailed"><code>request.socket.getPeerCertificate()</code></a> to obtain the client's | |
authentication details.</p> | |
<h4>request.stream<span><a class="mark" href="#http2_request_stream" id="http2_request_stream">#</a></span></h4> | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><a href="http2.html#http2_class_http2stream" class="type"><Http2Stream></a></li> | |
+<li><a href="#http2_class_http2stream" class="type"><Http2Stream></a></li> | |
</ul> | |
<p>The <a href="#http2_class_http2stream"><code>Http2Stream</code></a> object backing the request.</p> | |
<h4>request.trailers<span><a class="mark" href="#http2_request_trailers" id="http2_request_trailers">#</a></span></h4> | |
@@ -30183,8 +30136,8 @@ | |
<span>Added in: v8.4.0</span> | |
</div><p>This object is created internally by an HTTP server — not by the user. It is | |
passed as the second parameter to the <a href="#http2_event_request"><code>'request'</code></a> event.</p> | |
-<p>The response implements, but does not inherit from, the <a href="stream.html#stream_writable_streams">Writable Stream</a> | |
-interface. This is an <a href="events.html"><code>EventEmitter</code></a> with the following events:</p> | |
+<p>The response implements, but does not inherit from, the <a href="#stream_writable_streams">Writable Stream</a> | |
+interface. This is an <a href="#events_class_eventemitter"><code>EventEmitter</code></a> with the following events:</p> | |
<h4>Event: 'close'<span><a class="mark" href="#http2_event_close_3" id="http2_event_close_3">#</a></span></h4> | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
@@ -30207,12 +30160,12 @@ | |
<p>This method adds HTTP trailing headers (a header but at the end of the | |
message) to the response.</p> | |
<p>Attempting to set a header field name or value that contains invalid characters | |
-will result in a <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> being thrown.</p> | |
+will result in a <a href="#errors_class_typeerror"><code>TypeError</code></a> being thrown.</p> | |
<h4>response.connection<span><a class="mark" href="#http2_response_connection" id="http2_response_connection">#</a></span></h4> | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><a href="net.html#net_class_net_socket" class="type"><net.Socket></a> | <a href="tls.html#tls_class_tls_tlssocket" class="type"><tls.TLSSocket></a></li> | |
+<li><a href="#net_class_net_socket" class="type"><net.Socket></a> | <a href="#tls_class_tls_tlssocket" class="type"><tls.TLSSocket></a></li> | |
</ul> | |
<p>See <a href="#http2_response_socket"><code>response.socket</code></a>.</p> | |
<h4>response.end([data][, encoding][, callback])<span><a class="mark" href="#http2_response_end_data_encoding_callback" id="http2_response_end_data_encoding_callback">#</a></span></h4> | |
@@ -30229,7 +30182,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this" class="type"><this></a></li> | |
@@ -30238,7 +30191,7 @@ | |
have been sent; that server should consider this message complete. | |
The method, <code>response.end()</code>, MUST be called on each response.</p> | |
<p>If <code>data</code> is specified, it is equivalent to calling | |
-<a href="http.html#http_response_write_chunk_encoding_callback"><code>response.write(data, encoding)</code></a> followed by <code>response.end(callback)</code>.</p> | |
+<a href="#http_response_write_chunk_encoding_callback"><code>response.write(data, encoding)</code></a> followed by <code>response.end(callback)</code>.</p> | |
<p>If <code>callback</code> is specified, it will be called when the response stream | |
is finished.</p> | |
<h4>response.finished<span><a class="mark" href="#http2_response_finished" id="http2_response_finished">#</a></span></h4> | |
@@ -30354,7 +30307,7 @@ | |
<pre><code class="lang-js">response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']); | |
</code></pre> | |
<p>Attempting to set a header field name or value that contains invalid characters | |
-will result in a <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> being thrown.</p> | |
+will result in a <a href="#errors_class_typeerror"><code>TypeError</code></a> being thrown.</p> | |
<p>When headers have been set with <a href="#http2_response_setheader_name_value"><code>response.setHeader()</code></a>, they will be merged | |
with any headers passed to <a href="#http2_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a>, with the headers passed | |
to <a href="#http2_response_writehead_statuscode_statusmessage_headers"><code>response.writeHead()</code></a> given precedence.</p> | |
@@ -30372,7 +30325,7 @@ | |
</div><ul> | |
<li><code>msecs</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
-<li>Returns: <a href="http2.html#http2_class_http2_http2serverresponse" class="type"><http2.Http2ServerResponse></a></li> | |
+<li>Returns: <a href="#http2_class_http2_http2serverresponse" class="type"><http2.Http2ServerResponse></a></li> | |
</ul> | |
<p>Sets the <a href=""><code>Http2Stream</code></a>'s timeout value to <code>msecs</code>. If a callback is | |
provided, then it is added as a listener on the <code>'timeout'</code> event on | |
@@ -30385,7 +30338,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><a href="net.html#net_class_net_socket" class="type"><net.Socket></a> | <a href="tls.html#tls_class_tls_tlssocket" class="type"><tls.TLSSocket></a></li> | |
+<li><a href="#net_class_net_socket" class="type"><net.Socket></a> | <a href="#tls_class_tls_tlssocket" class="type"><tls.TLSSocket></a></li> | |
</ul> | |
<p>Returns a <code>Proxy</code> object that acts as a <code>net.Socket</code> (or <code>tls.TLSSocket</code>) but | |
applies getters, setters, and methods based on HTTP/2 logic.</p> | |
@@ -30432,14 +30385,14 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><a href="http2.html#http2_class_http2stream" class="type"><Http2Stream></a></li> | |
+<li><a href="#http2_class_http2stream" class="type"><Http2Stream></a></li> | |
</ul> | |
<p>The <a href="#http2_class_http2stream"><code>Http2Stream</code></a> object backing the response.</p> | |
<h4>response.write(chunk[, encoding][, callback])<span><a class="mark" href="#http2_response_write_chunk_encoding_callback" id="http2_response_write_chunk_encoding_callback">#</a></span></h4> | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
</div><ul> | |
-<li><code>chunk</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li><code>chunk</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
@@ -30513,7 +30466,7 @@ | |
}); | |
</code></pre> | |
<p>Attempting to set a header field name or value that contains invalid characters | |
-will result in a <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> being thrown.</p> | |
+will result in a <a href="#errors_class_typeerror"><code>TypeError</code></a> being thrown.</p> | |
<h4>response.createPushResponse(headers, callback)<span><a class="mark" href="#http2_response_createpushresponse_headers_callback" id="http2_response_createpushresponse_headers_callback">#</a></span></h4> | |
<div class="api_metadata"> | |
<span>Added in: v8.4.0</span> | |
@@ -30575,37 +30528,35 @@ | |
<li><code>type</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Either <code>'server'</code> or <code>'client'</code> to identify the type of | |
<code>Http2Session</code>.</li> | |
</ul> | |
-<!-- [end-include:http2.md] --> | |
-<!-- [start-include:https.md] --> | |
<h1>HTTPS<span><a class="mark" href="#https_https" id="https_https">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a | |
separate module.</p> | |
<h2>Class: https.Agent<span><a class="mark" href="#https_class_https_agent" id="https_class_https_agent">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.4.5</span> | |
-</div><p>An <a href="#https_class_https_agent"><code>Agent</code></a> object for HTTPS similar to <a href="http.html#http_class_http_agent"><code>http.Agent</code></a>. See | |
+</div><p>An <a href="#https_class_https_agent"><code>Agent</code></a> object for HTTPS similar to <a href="#http_class_http_agent"><code>http.Agent</code></a>. See | |
<a href="#https_https_request_options_callback"><code>https.request()</code></a> for more information.</p> | |
<h2>Class: https.Server<span><a class="mark" href="#https_class_https_server" id="https_class_https_server">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.3.4</span> | |
</div><p>This class is a subclass of <code>tls.Server</code> and emits events same as | |
-<a href="http.html#http_class_http_server"><code>http.Server</code></a>. See <a href="http.html#http_class_http_server"><code>http.Server</code></a> for more information.</p> | |
+<a href="#http_class_http_server"><code>http.Server</code></a>. See <a href="#http_class_http_server"><code>http.Server</code></a> for more information.</p> | |
<h3>server.close([callback])<span><a class="mark" href="#https_server_close_callback" id="https_server_close_callback">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.90</span> | |
</div><ul> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
</ul> | |
-<p>See <a href="http.html#http_server_close_callback"><code>server.close()</code></a> from the HTTP module for details.</p> | |
+<p>See <a href="#http_server_close_callback"><code>server.close()</code></a> from the HTTP module for details.</p> | |
<h3>server.listen()<span><a class="mark" href="#https_server_listen" id="https_server_listen">#</a></span></h3> | |
<p>Starts the HTTPS server listening for encrypted connections. | |
-This method is identical to <a href="net.html#net_server_listen"><code>server.listen()</code></a> from <a href="net.html#net_class_net_server"><code>net.Server</code></a>.</p> | |
+This method is identical to <a href="#net_server_listen"><code>server.listen()</code></a> from <a href="#net_class_net_server"><code>net.Server</code></a>.</p> | |
<h3>server.maxHeadersCount<span><a class="mark" href="#https_server_maxheaderscount" id="https_server_maxheaderscount">#</a></span></h3> | |
<ul> | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> <strong>Default:</strong> <code>2000</code></li> | |
</ul> | |
-<p>See <a href="http.html#http_server_maxheaderscount"><code>http.Server#maxHeadersCount</code></a>.</p> | |
+<p>See <a href="#http_server_maxheaderscount"><code>http.Server#maxHeadersCount</code></a>.</p> | |
<h3>server.setTimeout([msecs][, callback])<span><a class="mark" href="#https_server_settimeout_msecs_callback" id="https_server_settimeout_msecs_callback">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.11.2</span> | |
@@ -30613,27 +30564,27 @@ | |
<li><code>msecs</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> <strong>Default:</strong> <code>120000</code> (2 minutes)</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
</ul> | |
-<p>See <a href="http.html#http_server_settimeout_msecs_callback"><code>http.Server#setTimeout()</code></a>.</p> | |
+<p>See <a href="#http_server_settimeout_msecs_callback"><code>http.Server#setTimeout()</code></a>.</p> | |
<h3>server.timeout<span><a class="mark" href="#https_server_timeout" id="https_server_timeout">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.11.2</span> | |
</div><ul> | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> <strong>Default:</strong> <code>120000</code> (2 minutes)</li> | |
</ul> | |
-<p>See <a href="http.html#http_server_timeout"><code>http.Server#timeout</code></a>.</p> | |
+<p>See <a href="#http_server_timeout"><code>http.Server#timeout</code></a>.</p> | |
<h3>server.keepAliveTimeout<span><a class="mark" href="#https_server_keepalivetimeout" id="https_server_keepalivetimeout">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v8.0.0</span> | |
</div><ul> | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> <strong>Default:</strong> <code>5000</code> (5 seconds)</li> | |
</ul> | |
-<p>See <a href="http.html#http_server_keepalivetimeout"><code>http.Server#keepAliveTimeout</code></a>.</p> | |
+<p>See <a href="#http_server_keepalivetimeout"><code>http.Server#keepAliveTimeout</code></a>.</p> | |
<h2>https.createServer([options][, requestListener])<span><a class="mark" href="#https_https_createserver_options_requestlistener" id="https_https_createserver_options_requestlistener">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.3.4</span> | |
</div><ul> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> Accepts <code>options</code> from <a href="#tls_tls_createserver_options_secureconnectionlistener"><code>tls.createServer()</code></a>, | |
-<a href="#tls_tls_createsecurecontext_options"><code>tls.createSecureContext()</code></a> and <a href="http.html#http_http_createserver_options_requestlistener"><code>http.createServer()</code></a>.</li> | |
+<a href="#tls_tls_createsecurecontext_options"><code>tls.createSecureContext()</code></a> and <a href="#http_http_createserver_options_requestlistener"><code>http.createServer()</code></a>.</li> | |
<li><code>requestListener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> A listener to be added to the <code>'request'</code> event.</li> | |
</ul> | |
<p>Example:</p> | |
@@ -30679,13 +30630,13 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> Accepts the same <code>options</code> as | |
+<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> Accepts the same <code>options</code> as | |
<a href="#https_https_request_options_callback"><code>https.request()</code></a>, with the <code>method</code> always set to <code>GET</code>.</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
</ul> | |
-<p>Like <a href="http.html#http_http_get_options_callback"><code>http.get()</code></a> but for HTTPS.</p> | |
-<p><code>options</code> can be an object, a string, or a <a href="url.html#url_class_url"><code>URL</code></a> object. If <code>options</code> is a | |
-string, it is automatically parsed with <a href="#url_constructor_new_url_input_base"><code>new URL()</code></a>. If it is a <a href="url.html#url_class_url"><code>URL</code></a> | |
+<p>Like <a href="#http_http_get_options_callback"><code>http.get()</code></a> but for HTTPS.</p> | |
+<p><code>options</code> can be an object, a string, or a <a href="#url_the_whatwg_url_api"><code>URL</code></a> object. If <code>options</code> is a | |
+string, it is automatically parsed with <a href="#url_constructor_new_url_input_base"><code>new URL()</code></a>. If it is a <a href="#url_the_whatwg_url_api"><code>URL</code></a> | |
object, it will be automatically converted to an ordinary <code>options</code> object.</p> | |
<p>Example:</p> | |
<pre><code class="lang-js">const https = require('https'); | |
@@ -30723,8 +30674,8 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="url.html#url_the_whatwg_url_api" class="type"><URL></a> Accepts all <code>options</code> from | |
-<a href="http.html#http_http_request_options_callback"><code>http.request()</code></a>, with some differences in default values:<ul> | |
+<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#url_the_whatwg_url_api" class="type"><URL></a> Accepts all <code>options</code> from | |
+<a href="#http_http_request_options_callback"><code>http.request()</code></a>, with some differences in default values:<ul> | |
<li><code>protocol</code> <strong>Default:</strong> <code>'https:'</code></li> | |
<li><code>port</code> <strong>Default:</strong> <code>443</code></li> | |
<li><code>agent</code> <strong>Default:</strong> <code>https.globalAgent</code></li> | |
@@ -30737,8 +30688,8 @@ | |
<code>ca</code>, <code>cert</code>, <code>ciphers</code>, <code>clientCertEngine</code>, <code>crl</code>, <code>dhparam</code>, <code>ecdhCurve</code>, | |
<code>honorCipherOrder</code>, <code>key</code>, <code>passphrase</code>, <code>pfx</code>, <code>rejectUnauthorized</code>, | |
<code>secureOptions</code>, <code>secureProtocol</code>, <code>servername</code>, <code>sessionIdContext</code>.</p> | |
-<p><code>options</code> can be an object, a string, or a <a href="url.html#url_class_url"><code>URL</code></a> object. If <code>options</code> is a | |
-string, it is automatically parsed with <a href="#url_constructor_new_url_input_base"><code>new URL()</code></a>. If it is a <a href="url.html#url_class_url"><code>URL</code></a> | |
+<p><code>options</code> can be an object, a string, or a <a href="#url_the_whatwg_url_api"><code>URL</code></a> object. If <code>options</code> is a | |
+string, it is automatically parsed with <a href="#url_constructor_new_url_input_base"><code>new URL()</code></a>. If it is a <a href="#url_the_whatwg_url_api"><code>URL</code></a> | |
object, it will be automatically converted to an ordinary <code>options</code> object.</p> | |
<p>Example:</p> | |
<pre><code class="lang-js">const https = require('https'); | |
@@ -30795,7 +30746,7 @@ | |
// ... | |
}); | |
</code></pre> | |
-<p>Example using a <a href="url.html#url_class_url"><code>URL</code></a> as <code>options</code>:</p> | |
+<p>Example using a <a href="#url_the_whatwg_url_api"><code>URL</code></a> as <code>options</code>:</p> | |
<pre><code class="lang-js">const options = new URL('https://abc:[email protected]'); | |
const req = https.request(options, (res) => { | |
@@ -30890,11 +30841,9 @@ | |
statusCode: 200 | |
headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho="; pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4="; pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains | |
</code></pre> | |
-<!-- [end-include:https.md] --> | |
-<!-- [start-include:inspector.md] --> | |
<h1>Inspector<span><a class="mark" href="#inspector_inspector" id="inspector_inspector">#</a></span></h1> | |
<!--introduced_in=v8.0.0--> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>The <code>inspector</code> module provides an API for interacting with the V8 inspector.</p> | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>The <code>inspector</code> module provides an API for interacting with the V8 inspector.</p> | |
<p>It can be accessed using:</p> | |
<pre><code class="lang-js">const inspector = require('inspector'); | |
</code></pre> | |
@@ -30928,7 +30877,7 @@ | |
</div><p>Create a new instance of the <code>inspector.Session</code> class. The inspector session | |
needs to be connected through <a href="#inspector_session_connect"><code>session.connect()</code></a> before the messages | |
can be dispatched to the inspector backend.</p> | |
-<p><code>inspector.Session</code> is an <a href="events.html"><code>EventEmitter</code></a> with the following events:</p> | |
+<p><code>inspector.Session</code> is an <a href="#events_class_eventemitter"><code>EventEmitter</code></a> with the following events:</p> | |
<h3>Event: 'inspectorNotification'<span><a class="mark" href="#inspector_event_inspectornotification" id="inspector_event_inspectornotification">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v8.0.0</span> | |
@@ -31014,8 +30963,6 @@ | |
}); | |
}); | |
</code></pre> | |
-<!-- [end-include:inspector.md] --> | |
-<!-- [start-include:intl.md] --> | |
<h1>Internationalization Support<span><a class="mark" href="#intl_internationalization_support" id="intl_internationalization_support">#</a></span></h1> | |
<!--introduced_in=v8.2.0--> | |
<!-- type=misc --> | |
@@ -31036,13 +30983,13 @@ | |
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString"><code>Date.prototype.toLocaleString()</code></a></li> | |
</ul> | |
</li> | |
-<li>The <a href="url.html#url_the_whatwg_url_api">WHATWG URL parser</a>'s <a href="https://en.wikipedia.org/wiki/Internationalized_domain_name">internationalized domain names</a> (IDNs) support</li> | |
-<li><a href="buffer.html#buffer_buffer_transcode_source_fromenc_toenc"><code>require('buffer').transcode()</code></a></li> | |
-<li>More accurate <a href="repl.html#repl_repl">REPL</a> line editing</li> | |
-<li><a href="util.html#util_class_util_textdecoder"><code>require('util').TextDecoder</code></a></li> | |
+<li>The <a href="#url_the_whatwg_url_api">WHATWG URL parser</a>'s <a href="https://en.wikipedia.org/wiki/Internationalized_domain_name">internationalized domain names</a> (IDNs) support</li> | |
+<li><a href="#buffer_buffer_transcode_source_fromenc_toenc"><code>require('buffer').transcode()</code></a></li> | |
+<li>More accurate <a href="#repl_repl">REPL</a> line editing</li> | |
+<li><a href="#util_class_util_textdecoder"><code>require('util').TextDecoder</code></a></li> | |
<li><a href="https://github.com/tc39/proposal-regexp-unicode-property-escapes"><code>RegExp</code> Unicode Property Escapes</a></li> | |
</ul> | |
-<p>Node.js (and its underlying V8 engine) uses <a href="intl.html#intl_options_for_building_node_js">ICU</a> to implement these features | |
+<p>Node.js (and its underlying V8 engine) uses <a href="http://icu-project.org/">ICU</a> to implement these features | |
in native C/C++ code. However, some of them require a very large ICU data file | |
in order to support all locales of the world. Because it is expected that most | |
Node.js users will make use of only a small portion of ICU functionality, only | |
@@ -31122,28 +31069,28 @@ | |
<td>full</td> | |
</tr> | |
<tr> | |
-<td><a href="url.html#url_the_whatwg_url_api">WHATWG URL Parser</a></td> | |
+<td><a href="#url_the_whatwg_url_api">WHATWG URL Parser</a></td> | |
<td>partial (no IDN support)</td> | |
<td>full</td> | |
<td>full</td> | |
<td>full</td> | |
</tr> | |
<tr> | |
-<td><a href="buffer.html#buffer_buffer_transcode_source_fromenc_toenc"><code>require('buffer').transcode()</code></a></td> | |
+<td><a href="#buffer_buffer_transcode_source_fromenc_toenc"><code>require('buffer').transcode()</code></a></td> | |
<td>none (function does not exist)</td> | |
<td>full</td> | |
<td>full</td> | |
<td>full</td> | |
</tr> | |
<tr> | |
-<td><a href="repl.html#repl_repl">REPL</a></td> | |
+<td><a href="#repl_repl">REPL</a></td> | |
<td>partial (inaccurate line editing)</td> | |
<td>full</td> | |
<td>full</td> | |
<td>full</td> | |
</tr> | |
<tr> | |
-<td><a href="util.html#util_class_util_textdecoder"><code>require('util').TextDecoder</code></a></td> | |
+<td><a href="#util_class_util_textdecoder"><code>require('util').TextDecoder</code></a></td> | |
<td>partial (basic encodings support)</td> | |
<td>partial/full (depends on OS)</td> | |
<td>partial (Unicode-only)</td> | |
@@ -31171,7 +31118,7 @@ | |
make it possible to reuse the same set of data used by other components in the | |
OS.</p> | |
<p>Functionalities that only require the ICU library itself, such as | |
-<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize"><code>String.prototype.normalize()</code></a> and the <a href="url.html#url_the_whatwg_url_api">WHATWG URL parser</a>, are fully | |
+<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize"><code>String.prototype.normalize()</code></a> and the <a href="#url_the_whatwg_url_api">WHATWG URL parser</a>, are fully | |
supported under <code>system-icu</code>. Features that require ICU locale data in | |
addition, such as <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat"><code>Intl.DateTimeFormat</code></a> <em>may</em> be fully or partially | |
supported, depending on the completeness of the ICU data installed on the | |
@@ -31181,7 +31128,7 @@ | |
and includes a subset of ICU data (typically only the English locale) within | |
the <code>node</code> executable.</p> | |
<p>Functionalities that only require the ICU library itself, such as | |
-<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize"><code>String.prototype.normalize()</code></a> and the <a href="url.html#url_the_whatwg_url_api">WHATWG URL parser</a>, are fully | |
+<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize"><code>String.prototype.normalize()</code></a> and the <a href="#url_the_whatwg_url_api">WHATWG URL parser</a>, are fully | |
supported under <code>small-icu</code>. Features that require ICU locale data in addition, | |
such as <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat"><code>Intl.DateTimeFormat</code></a>, generally only work with the English locale:</p> | |
<pre><code class="lang-js">const january = new Date(9e8); | |
@@ -31203,11 +31150,11 @@ | |
data file is stored at <code>/some/directory</code>, it can be made available to ICU | |
through either:</p> | |
<ul> | |
-<li><p>The <a href="cli.html#cli_node_icu_data_file"><code>NODE_ICU_DATA</code></a> environment variable:</p> | |
+<li><p>The <a href="#cli_node_icu_data_file"><code>NODE_ICU_DATA</code></a> environment variable:</p> | |
<pre><code class="lang-shell">env NODE_ICU_DATA=/some/directory node | |
</code></pre> | |
</li> | |
-<li><p>The <a href="cli.html#cli_icu_data_dir_file"><code>--icu-data-dir</code></a> CLI parameter:</p> | |
+<li><p>The <a href="#cli_icu_data_dir_file"><code>--icu-data-dir</code></a> CLI parameter:</p> | |
<pre><code class="lang-shell">node --icu-data-dir=/some/directory | |
</code></pre> | |
</li> | |
@@ -31259,11 +31206,9 @@ | |
<li><a href="https://github.com/tc39/test262/tree/master/test/intl402">Test262</a>: ECMAScript's official conformance test suite includes a section | |
dedicated to ECMA-402.</li> | |
</ul> | |
-<!-- [end-include:intl.md] --> | |
-<!-- [start-include:modules.md] --> | |
<h1>Modules<span><a class="mark" href="#modules_modules" id="modules_modules">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><!--name=module--> | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><!--name=module--> | |
<p>In the Node.js module system, each file is treated as a separate module. For | |
example, consider a file named <code>foo.js</code>:</p> | |
<pre><code class="lang-js">const circle = require('./circle.js'); | |
@@ -31506,7 +31451,7 @@ | |
<code>require('./circle')</code> to find it.</p> | |
<p>Without a leading <code>'/'</code>, <code>'./'</code>, or <code>'../'</code> to indicate a file, the module must | |
either be a core module or is loaded from a <code>node_modules</code> folder.</p> | |
-<p>If the given path does not exist, <code>require()</code> will throw an <a href="errors.html#errors_class_error"><code>Error</code></a> with its | |
+<p>If the given path does not exist, <code>require()</code> will throw an <a href="#errors_class_error"><code>Error</code></a> with its | |
<code>code</code> property set to <code>'MODULE_NOT_FOUND'</code>.</p> | |
<h2>Folders as Modules<span><a class="mark" href="#modules_folders_as_modules" id="modules_folders_as_modules">#</a></span></h2> | |
<!--type=misc--> | |
@@ -31617,7 +31562,7 @@ | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>The directory name of the current module. This is the same as the | |
-<a href="path.html#path_path_dirname_path"><code>path.dirname()</code></a> of the <a href="#modules_filename"><code>__filename</code></a>.</p> | |
+<a href="#path_path_dirname_path"><code>path.dirname()</code></a> of the <a href="#modules_filename"><code>__filename</code></a>.</p> | |
<p>Example: running <code>node example.js</code> from <code>/Users/mjr</code></p> | |
<pre><code class="lang-js">console.log(__dirname); | |
// Prints: /Users/mjr | |
@@ -31690,7 +31635,7 @@ | |
<h4>require.extensions<span><a class="mark" href="#modules_require_extensions" id="modules_require_extensions">#</a></span></h4> | |
<div class="api_metadata"> | |
<span>Added in: v0.3.0</span><span>Deprecated since: v0.10.6</span> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated</div><ul> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated</div><ul> | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> | |
</ul> | |
<p>Instruct <code>require</code> on how to handle certain file extensions.</p> | |
@@ -31792,7 +31737,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.16</span> | |
</div><ul> | |
-<li><a href="modules.html#modules_the_module_object" class="type"><module[]></a></li> | |
+<li><a href="#modules_the_module_object" class="type"><module[]></a></li> | |
</ul> | |
<p>The module objects required by this one.</p> | |
<h3>module.exports<span><a class="mark" href="#modules_module_exports" id="modules_module_exports">#</a></span></h3> | |
@@ -31896,7 +31841,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.16</span> | |
</div><ul> | |
-<li><a href="modules.html#modules_the_module_object" class="type"><module></a></li> | |
+<li><a href="#modules_the_module_object" class="type"><module></a></li> | |
</ul> | |
<p>The module that first required this one.</p> | |
<h3>module.paths<span><a class="mark" href="#modules_module_paths" id="modules_module_paths">#</a></span></h3> | |
@@ -31940,12 +31885,10 @@ | |
by the <a href="#modules_the_module_wrapper">module wrapper</a>. To access it, require the <code>Module</code> module:</p> | |
<pre><code class="lang-js">const builtin = require('module').builtinModules; | |
</code></pre> | |
-<!-- [end-include:modules.md] --> | |
-<!-- [start-include:net.md] --> | |
<h1>Net<span><a class="mark" href="#net_net" id="net_net">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
<!--lint disable maximum-line-length--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>net</code> module provides an asynchronous network API for creating stream-based | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>net</code> module provides an asynchronous network API for creating stream-based | |
TCP or <a href="#net_ipc_support">IPC</a> servers (<a href="#net_net_createserver_options_connectionlistener"><code>net.createServer()</code></a>) and clients | |
(<a href="#net_net_createconnection"><code>net.createConnection()</code></a>).</p> | |
<p>It can be accessed using:</p> | |
@@ -31955,7 +31898,7 @@ | |
<p>The <code>net</code> module supports IPC with named pipes on Windows, and UNIX domain | |
sockets on other operating systems.</p> | |
<h3>Identifying paths for IPC connections<span><a class="mark" href="#net_identifying_paths_for_ipc_connections" id="net_identifying_paths_for_ipc_connections">#</a></span></h3> | |
-<p><a href="#net_net_connect"><code>net.connect()</code></a>, <a href="#net_net_createconnection"><code>net.createConnection()</code></a>, <a href="net.html#net_server_listen"><code>server.listen()</code></a> and | |
+<p><a href="#net_net_connect"><code>net.connect()</code></a>, <a href="#net_net_createconnection"><code>net.createConnection()</code></a>, <a href="#net_server_listen"><code>server.listen()</code></a> and | |
<a href="#net_socket_connect"><code>socket.connect()</code></a> take a <code>path</code> parameter to identify IPC endpoints.</p> | |
<p>On UNIX, the local domain is also known as the UNIX domain. The path is a | |
filesystem pathname. It gets truncated to <code>sizeof(sockaddr_un.sun_path) - 1</code>, | |
@@ -31988,10 +31931,10 @@ | |
</div><p>This class is used to create a TCP or <a href="#net_ipc_support">IPC</a> server.</p> | |
<h3>new net.Server([options][, connectionListener])<span><a class="mark" href="#net_new_net_server_options_connectionlistener" id="net_new_net_server_options_connectionlistener">#</a></span></h3> | |
<ul> | |
-<li>Returns: <a href="net.html#net_class_net_server" class="type"><net.Server></a></li> | |
+<li>Returns: <a href="#net_class_net_server" class="type"><net.Server></a></li> | |
</ul> | |
<p>See <a href="#net_net_createserver_options_connectionlistener"><code>net.createServer([options][, connectionListener])</code></a>.</p> | |
-<p><code>net.Server</code> is an <a href="events.html"><code>EventEmitter</code></a> with the following events:</p> | |
+<p><code>net.Server</code> is an <a href="#events_class_eventemitter"><code>EventEmitter</code></a> with the following events:</p> | |
<h3>Event: 'close'<span><a class="mark" href="#net_event_close" id="net_event_close">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.5.0</span> | |
@@ -32001,7 +31944,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.90</span> | |
</div><ul> | |
-<li><a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The connection object</li> | |
+<li><a href="#net_class_net_socket" class="type"><net.Socket></a> The connection object</li> | |
</ul> | |
<p>Emitted when a new connection is made. <code>socket</code> is an instance of | |
<code>net.Socket</code>.</p> | |
@@ -32011,14 +31954,14 @@ | |
</div><ul> | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
</ul> | |
-<p>Emitted when an error occurs. Unlike <a href="net.html#net_class_net_socket"><code>net.Socket</code></a>, the <a href="#dgram_event_close"><code>'close'</code></a> | |
+<p>Emitted when an error occurs. Unlike <a href="#net_class_net_socket"><code>net.Socket</code></a>, the <a href="#net_event_close"><code>'close'</code></a> | |
event will <strong>not</strong> be emitted directly following this event unless | |
<a href="#net_server_close_callback"><code>server.close()</code></a> is manually called. See the example in discussion of | |
-<a href="net.html#net_server_listen"><code>server.listen()</code></a>.</p> | |
+<a href="#net_server_listen"><code>server.listen()</code></a>.</p> | |
<h3>Event: 'listening'<span><a class="mark" href="#net_event_listening" id="net_event_listening">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.90</span> | |
-</div><p>Emitted when the server has been bound after calling <a href="net.html#net_server_listen"><code>server.listen()</code></a>.</p> | |
+</div><p>Emitted when the server has been bound after calling <a href="#net_server_listen"><code>server.listen()</code></a>.</p> | |
<h3>server.address()<span><a class="mark" href="#net_server_address" id="net_server_address">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.90</span> | |
@@ -32049,26 +31992,26 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.90</span> | |
</div><ul> | |
-<li>Returns: <a href="net.html#net_class_net_server" class="type"><net.Server></a></li> | |
+<li>Returns: <a href="#net_class_net_server" class="type"><net.Server></a></li> | |
</ul> | |
<p>Stops the server from accepting new connections and keeps existing | |
connections. This function is asynchronous, the server is finally closed | |
-when all connections are ended and the server emits a <a href="#dgram_event_close"><code>'close'</code></a> event. | |
+when all connections are ended and the server emits a <a href="#net_event_close"><code>'close'</code></a> event. | |
The optional <code>callback</code> will be called once the <code>'close'</code> event occurs. Unlike | |
that event, it will be called with an <code>Error</code> as its only argument if the server | |
was not open when it was closed.</p> | |
<h3>server.connections<span><a class="mark" href="#net_server_connections" id="net_server_connections">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.2.0</span><span>Deprecated since: v0.9.7</span> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="net.html#net_server_getconnections_callback"><code>server.getConnections()</code></a> instead.</div><p>The number of concurrent connections on the server.</p> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#net_server_getconnections_callback"><code>server.getConnections()</code></a> instead.</div><p>The number of concurrent connections on the server.</p> | |
<p>This becomes <code>null</code> when sending a socket to a child with | |
-<a href="child_process.html#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>. To poll forks and get current number of active | |
-connections use asynchronous <a href="net.html#net_server_getconnections_callback"><code>server.getConnections()</code></a> instead.</p> | |
+<a href="#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>. To poll forks and get current number of active | |
+connections use asynchronous <a href="#net_server_getconnections_callback"><code>server.getConnections()</code></a> instead.</p> | |
<h3>server.getConnections(callback)<span><a class="mark" href="#net_server_getconnections_callback" id="net_server_getconnections_callback">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.9.7</span> | |
</div><ul> | |
-<li>Returns: <a href="net.html#net_class_net_server" class="type"><net.Server></a></li> | |
+<li>Returns: <a href="#net_class_net_server" class="type"><net.Server></a></li> | |
</ul> | |
<p>Asynchronously get the number of concurrent connections on the server. Works | |
when sockets were sent to forks.</p> | |
@@ -32093,7 +32036,7 @@ | |
length of the queue of pending connections. The actual length will be determined | |
by the OS through sysctl settings such as <code>tcp_max_syn_backlog</code> and <code>somaxconn</code> | |
on Linux. The default value of this parameter is 511 (not 512).</p> | |
-<p>All <a href="net.html#net_class_net_socket"><code>net.Socket</code></a> are set to <code>SO_REUSEADDR</code> (see <a href="http://man7.org/linux/man-pages/man7/socket.7.html"><code>socket(7)</code></a> for | |
+<p>All <a href="#net_class_net_socket"><code>net.Socket</code></a> are set to <code>SO_REUSEADDR</code> (see <a href="http://man7.org/linux/man-pages/man7/socket.7.html"><code>socket(7)</code></a> for | |
details).</p> | |
<p>The <code>server.listen()</code> method can be called again if and only if there was an | |
error during the first <code>server.listen()</code> call or <code>server.close()</code> has been | |
@@ -32117,9 +32060,9 @@ | |
<span>Added in: v0.5.10</span> | |
</div><ul> | |
<li><code>handle</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> | |
-<li><code>backlog</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Common parameter of <a href="net.html#net_server_listen"><code>server.listen()</code></a> functions</li> | |
-<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Common parameter of <a href="net.html#net_server_listen"><code>server.listen()</code></a> functions</li> | |
-<li>Returns: <a href="net.html#net_class_net_server" class="type"><net.Server></a></li> | |
+<li><code>backlog</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Common parameter of <a href="#net_server_listen"><code>server.listen()</code></a> functions</li> | |
+<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Common parameter of <a href="#net_server_listen"><code>server.listen()</code></a> functions</li> | |
+<li>Returns: <a href="#net_class_net_server" class="type"><net.Server></a></li> | |
</ul> | |
<p>Start a server listening for connections on a given <code>handle</code> that has | |
already been bound to a port, a UNIX domain socket, or a Windows named pipe.</p> | |
@@ -32136,7 +32079,7 @@ | |
<li><code>host</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Will be ignored if <code>port</code> is specified. See | |
<a href="#net_identifying_paths_for_ipc_connections">Identifying paths for IPC connections</a>.</li> | |
-<li><code>backlog</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Common parameter of <a href="net.html#net_server_listen"><code>server.listen()</code></a> | |
+<li><code>backlog</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Common parameter of <a href="#net_server_listen"><code>server.listen()</code></a> | |
functions.</li> | |
<li><code>exclusive</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> <strong>Default:</strong> <code>false</code></li> | |
<li><code>readableAll</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> For IPC servers makes the pipe readable | |
@@ -32145,9 +32088,9 @@ | |
for all users. <strong>Default:</strong> <code>false</code></li> | |
</ul> | |
</li> | |
-<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Common parameter of <a href="net.html#net_server_listen"><code>server.listen()</code></a> | |
+<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Common parameter of <a href="#net_server_listen"><code>server.listen()</code></a> | |
functions.</li> | |
-<li>Returns: <a href="net.html#net_class_net_server" class="type"><net.Server></a></li> | |
+<li>Returns: <a href="#net_class_net_server" class="type"><net.Server></a></li> | |
</ul> | |
<p>If <code>port</code> is specified, it behaves the same as | |
<a href="#net_server_listen_port_host_backlog_callback"> | |
@@ -32175,9 +32118,9 @@ | |
</div><ul> | |
<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Path the server should listen to. See | |
<a href="#net_identifying_paths_for_ipc_connections">Identifying paths for IPC connections</a>.</li> | |
-<li><code>backlog</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Common parameter of <a href="net.html#net_server_listen"><code>server.listen()</code></a> functions.</li> | |
-<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Common parameter of <a href="net.html#net_server_listen"><code>server.listen()</code></a> functions.</li> | |
-<li>Returns: <a href="net.html#net_class_net_server" class="type"><net.Server></a></li> | |
+<li><code>backlog</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Common parameter of <a href="#net_server_listen"><code>server.listen()</code></a> functions.</li> | |
+<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Common parameter of <a href="#net_server_listen"><code>server.listen()</code></a> functions.</li> | |
+<li>Returns: <a href="#net_class_net_server" class="type"><net.Server></a></li> | |
</ul> | |
<p>Start an <a href="#net_ipc_support">IPC</a> server listening for connections on the given <code>path</code>.</p> | |
<h4>server.listen([port[, host[, backlog]]][, callback])<span><a class="mark" href="#net_server_listen_port_host_backlog_callback" id="net_server_listen_port_host_backlog_callback">#</a></span></h4> | |
@@ -32186,9 +32129,9 @@ | |
</div><ul> | |
<li><code>port</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
<li><code>host</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li><code>backlog</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Common parameter of <a href="net.html#net_server_listen"><code>server.listen()</code></a> functions.</li> | |
-<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Common parameter of <a href="net.html#net_server_listen"><code>server.listen()</code></a> functions.</li> | |
-<li>Returns: <a href="net.html#net_class_net_server" class="type"><net.Server></a></li> | |
+<li><code>backlog</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Common parameter of <a href="#net_server_listen"><code>server.listen()</code></a> functions.</li> | |
+<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Common parameter of <a href="#net_server_listen"><code>server.listen()</code></a> functions.</li> | |
+<li>Returns: <a href="#net_class_net_server" class="type"><net.Server></a></li> | |
</ul> | |
<p>Start a TCP server listening for connections on the given <code>port</code> and <code>host</code>.</p> | |
<p>If <code>port</code> is omitted or is 0, the operating system will assign an arbitrary | |
@@ -32212,12 +32155,12 @@ | |
</div><p>Set this property to reject connections when the server's connection count gets | |
high.</p> | |
<p>It is not recommended to use this option once a socket has been sent to a child | |
-with <a href="child_process.html#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>.</p> | |
+with <a href="#child_process_child_process_fork_modulepath_args_options"><code>child_process.fork()</code></a>.</p> | |
<h3>server.ref()<span><a class="mark" href="#net_server_ref" id="net_server_ref">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.9.1</span> | |
</div><ul> | |
-<li>Returns: <a href="net.html#net_class_net_server" class="type"><net.Server></a></li> | |
+<li>Returns: <a href="#net_class_net_server" class="type"><net.Server></a></li> | |
</ul> | |
<p>Opposite of <code>unref()</code>, calling <code>ref()</code> on a previously <code>unref</code>ed server will | |
<em>not</em> let the program exit if it's the only server left (the default behavior). | |
@@ -32226,7 +32169,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.9.1</span> | |
</div><ul> | |
-<li>Returns: <a href="net.html#net_class_net_server" class="type"><net.Server></a></li> | |
+<li>Returns: <a href="#net_class_net_server" class="type"><net.Server></a></li> | |
</ul> | |
<p>Calling <code>unref()</code> on a server will allow the program to exit if this is the only | |
active server in the event system. If the server is already <code>unref</code>ed calling | |
@@ -32236,14 +32179,14 @@ | |
<span>Added in: v0.3.4</span> | |
</div><p>This class is an abstraction of a TCP socket or a streaming <a href="#net_ipc_support">IPC</a> endpoint | |
(uses named pipes on Windows, and UNIX domain sockets otherwise). A | |
-<code>net.Socket</code> is also a <a href="stream.html#stream_class_stream_duplex">duplex stream</a>, so it can be both readable and | |
-writable, and it is also an <a href="events.html"><code>EventEmitter</code></a>.</p> | |
+<code>net.Socket</code> is also a <a href="#stream_class_stream_duplex">duplex stream</a>, so it can be both readable and | |
+writable, and it is also an <a href="#events_class_eventemitter"><code>EventEmitter</code></a>.</p> | |
<p>A <code>net.Socket</code> can be created by the user and used directly to interact with | |
a server. For example, it is returned by <a href="#net_net_createconnection"><code>net.createConnection()</code></a>, | |
so the user can use it to talk to the server.</p> | |
<p>It can also be created by Node.js and passed to the user when a connection | |
is received. For example, it is passed to the listeners of a | |
-<a href="#net_event_connection"><code>'connection'</code></a> event emitted on a <a href="net.html#net_class_net_server"><code>net.Server</code></a>, so the user can use | |
+<a href="#net_event_connection"><code>'connection'</code></a> event emitted on a <a href="#net_class_net_server"><code>net.Server</code></a>, so the user can use | |
it to interact with the client.</p> | |
<h3>new net.Socket([options])<span><a class="mark" href="#net_new_net_socket_options" id="net_new_net_socket_options">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -32254,7 +32197,7 @@ | |
<li><code>fd</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> If specified, wrap around an existing socket with | |
the given file descriptor, otherwise a new socket will be created.</li> | |
<li><code>allowHalfOpen</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> Indicates whether half-opened TCP connections | |
-are allowed. See <a href="#net_net_createserver_options_connectionlistener"><code>net.createServer()</code></a> and the <a href="#stream_event_end"><code>'end'</code></a> event | |
+are allowed. See <a href="#net_net_createserver_options_connectionlistener"><code>net.createServer()</code></a> and the <a href="#net_event_end"><code>'end'</code></a> event | |
for details. <strong>Default:</strong> <code>false</code>.</li> | |
<li><code>readable</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> Allow reads on the socket when an <code>fd</code> is passed, | |
otherwise ignored. <strong>Default:</strong> <code>false</code>.</li> | |
@@ -32262,7 +32205,7 @@ | |
otherwise ignored. <strong>Default:</strong> <code>false</code>.</li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
</ul> | |
<p>The newly created socket can be either a TCP socket or a streaming <a href="#net_ipc_support">IPC</a> | |
endpoint, depending on what it <a href="#net_socket_connect"><code>connect()</code></a> to.</p> | |
@@ -32283,7 +32226,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.90</span> | |
</div><ul> | |
-<li><a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
+<li><a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Emitted when data is received. The argument <code>data</code> will be a <code>Buffer</code> or | |
<code>String</code>. Encoding of data is set by <a href="#net_socket_setencoding_encoding"><code>socket.setEncoding()</code></a>.</p> | |
@@ -32330,9 +32273,9 @@ | |
</div><p>Emitted after resolving the hostname but before connecting. | |
Not applicable to UNIX sockets.</p> | |
<ul> | |
-<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> The error object. See <a href="dns.html#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>.</li> | |
+<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> The error object. See <a href="#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>.</li> | |
<li><code>address</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The IP address.</li> | |
-<li><code>family</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> The address type. See <a href="dns.html#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>.</li> | |
+<li><code>family</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> The address type. See <a href="#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>.</li> | |
<li><code>host</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The hostname.</li> | |
</ul> | |
<h3>Event: 'ready'<span><a class="mark" href="#net_event_ready" id="net_event_ready">#</a></span></h3> | |
@@ -32389,7 +32332,7 @@ | |
for <a href="#net_ipc_support">IPC</a> connections.</li> | |
<li><a href="#net_socket_connect_port_host_connectlistener"><code>socket.connect(port[, host][, connectListener])</code></a> | |
for TCP connections.</li> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
</ul> | |
<p>This function is asynchronous. When the connection is established, the | |
<a href="#net_event_connect"><code>'connect'</code></a> event will be emitted. If there is a problem connecting, | |
@@ -32417,7 +32360,7 @@ | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> | |
<li><code>connectListener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Common parameter of <a href="#net_socket_connect"><code>socket.connect()</code></a> | |
methods. Will be added as a listener for the <a href="#net_event_connect"><code>'connect'</code></a> event once.</li> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
</ul> | |
<p>Initiate a connection on a given socket. Normally this method is not needed, | |
the socket should be created and opened with <a href="#net_net_createconnection"><code>net.createConnection()</code></a>. Use | |
@@ -32430,8 +32373,8 @@ | |
<li><code>localPort</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Local port the socket should connect from.</li> | |
<li><code>family</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a>: Version of IP stack, can be either <code>4</code> or <code>6</code>. | |
<strong>Default:</strong> <code>4</code>.</li> | |
-<li><code>hints</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Optional <a href="dns.html#dns_supported_getaddrinfo_flags"><code>dns.lookup()</code> hints</a>.</li> | |
-<li><code>lookup</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Custom lookup function. <strong>Default:</strong> <a href="dns.html#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>.</li> | |
+<li><code>hints</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Optional <a href="#dns_supported_getaddrinfo_flags"><code>dns.lookup()</code> hints</a>.</li> | |
+<li><code>lookup</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Custom lookup function. <strong>Default:</strong> <a href="#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>.</li> | |
</ul> | |
<p>For <a href="#net_ipc_support">IPC</a> connections, available <code>options</code> are:</p> | |
<ul> | |
@@ -32445,7 +32388,7 @@ | |
<a href="#net_identifying_paths_for_ipc_connections">Identifying paths for IPC connections</a>.</li> | |
<li><code>connectListener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Common parameter of <a href="#net_socket_connect"><code>socket.connect()</code></a> | |
methods. Will be added as a listener for the <a href="#net_event_connect"><code>'connect'</code></a> event once.</li> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
</ul> | |
<p>Initiate an <a href="#net_ipc_support">IPC</a> connection on the given socket.</p> | |
<p>Alias to | |
@@ -32459,7 +32402,7 @@ | |
<li><code>host</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Host the client should connect to.</li> | |
<li><code>connectListener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Common parameter of <a href="#net_socket_connect"><code>socket.connect()</code></a> | |
methods. Will be added as a listener for the <a href="#net_event_connect"><code>'connect'</code></a> event once.</li> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
</ul> | |
<p>Initiate a TCP connection on the given socket.</p> | |
<p>Alias to | |
@@ -32478,7 +32421,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.90</span> | |
</div><ul> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
</ul> | |
<p>Ensures that no more I/O activity happens on this socket. Only necessary in | |
case of errors (parse error or so).</p> | |
@@ -32493,7 +32436,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.90</span> | |
</div><ul> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
</ul> | |
<p>Half-closes the socket. i.e., it sends a FIN packet. It is possible the | |
server will still send some data.</p> | |
@@ -32513,15 +32456,15 @@ | |
<code>80</code> or <code>21</code>.</p> | |
<h3>socket.pause()<span><a class="mark" href="#net_socket_pause" id="net_socket_pause">#</a></span></h3> | |
<ul> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
</ul> | |
-<p>Pauses the reading of data. That is, <a href="#stream_event_data"><code>'data'</code></a> events will not be emitted. | |
+<p>Pauses the reading of data. That is, <a href="#net_event_data"><code>'data'</code></a> events will not be emitted. | |
Useful to throttle back an upload.</p> | |
<h3>socket.ref()<span><a class="mark" href="#net_socket_ref" id="net_socket_ref">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.9.1</span> | |
</div><ul> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
</ul> | |
<p>Opposite of <code>unref()</code>, calling <code>ref()</code> on a previously <code>unref</code>ed socket will | |
<em>not</em> let the program exit if it's the only socket left (the default behavior). | |
@@ -32543,24 +32486,24 @@ | |
<code>80</code> or <code>21</code>.</p> | |
<h3>socket.resume()<span><a class="mark" href="#net_socket_resume" id="net_socket_resume">#</a></span></h3> | |
<ul> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
</ul> | |
<p>Resumes reading after a call to <a href="#net_socket_pause"><code>socket.pause()</code></a>.</p> | |
<h3>socket.setEncoding([encoding])<span><a class="mark" href="#net_socket_setencoding_encoding" id="net_socket_setencoding_encoding">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.90</span> | |
</div><ul> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
</ul> | |
-<p>Set the encoding for the socket as a <a href="stream.html#stream_class_stream_readable">Readable Stream</a>. See | |
-<a href="stream.html#stream_readable_setencoding_encoding"><code>readable.setEncoding()</code></a> for more information.</p> | |
+<p>Set the encoding for the socket as a <a href="#stream_class_stream_readable">Readable Stream</a>. See | |
+<a href="#stream_readable_setencoding_encoding"><code>readable.setEncoding()</code></a> for more information.</p> | |
<h3>socket.setKeepAlive([enable][, initialDelay])<span><a class="mark" href="#net_socket_setkeepalive_enable_initialdelay" id="net_socket_setkeepalive_enable_initialdelay">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.92</span> | |
</div><ul> | |
<li><code>enable</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> <strong>Default:</strong> <code>false</code></li> | |
<li><code>initialDelay</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> <strong>Default:</strong> <code>0</code></li> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
</ul> | |
<p>Enable/disable keep-alive functionality, and optionally set the initial | |
delay before the first keepalive probe is sent on an idle socket.</p> | |
@@ -32573,7 +32516,7 @@ | |
<span>Added in: v0.1.90</span> | |
</div><ul> | |
<li><code>noDelay</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> <strong>Default:</strong> <code>true</code></li> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
</ul> | |
<p>Disables the Nagle algorithm. By default TCP connections use the Nagle | |
algorithm, they buffer data before sending it off. Setting <code>true</code> for | |
@@ -32582,7 +32525,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.90</span> | |
</div><ul> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
</ul> | |
<p>Sets the socket to timeout after <code>timeout</code> milliseconds of inactivity on | |
the socket. By default <code>net.Socket</code> do not have a timeout.</p> | |
@@ -32602,7 +32545,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.9.1</span> | |
</div><ul> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a> The socket itself.</li> | |
</ul> | |
<p>Calling <code>unref()</code> on a socket will allow the program to exit if this is the only | |
active socket in the event system. If the socket is already <code>unref</code>ed calling | |
@@ -32611,7 +32554,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.1.90</span> | |
</div><ul> | |
-<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
+<li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a></li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Only used when data is <code>string</code>. <strong>Default:</strong> <code>utf8</code>.</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
@@ -32620,10 +32563,10 @@ | |
case of a string — it defaults to UTF8 encoding.</p> | |
<p>Returns <code>true</code> if the entire data was flushed successfully to the kernel | |
buffer. Returns <code>false</code> if all or part of the data was queued in user memory. | |
-<a href="#stream_event_drain"><code>'drain'</code></a> will be emitted when the buffer is again free.</p> | |
+<a href="#net_event_drain"><code>'drain'</code></a> will be emitted when the buffer is again free.</p> | |
<p>The optional <code>callback</code> parameter will be executed when the data is finally | |
written out - this may not be immediately.</p> | |
-<p>See <code>Writable</code> stream <a href="stream.html#stream_writable_write_chunk_encoding_callback"><code>write()</code></a> method for more | |
+<p>See <code>Writable</code> stream <a href="#stream_writable_write_chunk_encoding_callback"><code>write()</code></a> method for more | |
information.</p> | |
<h2>net.connect()<span><a class="mark" href="#net_net_connect" id="net_net_connect">#</a></span></h2> | |
<p>Aliases to | |
@@ -32652,7 +32595,7 @@ | |
</div><p>Alias to | |
<a href="#net_net_createconnection_port_host_connectlistener"><code>net.createConnection(port[, host][, connectListener])</code></a>.</p> | |
<h2>net.createConnection()<span><a class="mark" href="#net_net_createconnection" id="net_net_createconnection">#</a></span></h2> | |
-<p>A factory function, which creates a new <a href="net.html#net_class_net_socket"><code>net.Socket</code></a>, | |
+<p>A factory function, which creates a new <a href="#net_class_net_socket"><code>net.Socket</code></a>, | |
immediately initiates connection with <a href="#net_socket_connect"><code>socket.connect()</code></a>, | |
then returns the <code>net.Socket</code> that starts the connection.</p> | |
<p>When the connection is established, a <a href="#net_event_connect"><code>'connect'</code></a> event will be emitted | |
@@ -32678,7 +32621,7 @@ | |
<li><code>connectListener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Common parameter of the | |
<a href="#net_net_createconnection"><code>net.createConnection()</code></a> functions. If supplied, will be added as | |
a listener for the <a href="#net_event_connect"><code>'connect'</code></a> event on the returned socket once.</li> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The newly created socket used to start the connection.</li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a> The newly created socket used to start the connection.</li> | |
</ul> | |
<p>For available options, see | |
<a href="#net_new_net_socket_options"><code>new net.Socket([options])</code></a> | |
@@ -32720,10 +32663,10 @@ | |
<a href="#net_net_createconnection"><code>net.createConnection()</code></a> functions, an "once" listener for the | |
<code>'connect'</code> event on the initiating socket. Will be passed to | |
<a href="#net_socket_connect_path_connectlistener"><code>socket.connect(path[, connectListener])</code></a>.</li> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The newly created socket used to start the connection.</li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a> The newly created socket used to start the connection.</li> | |
</ul> | |
<p>Initiates an <a href="#net_ipc_support">IPC</a> connection.</p> | |
-<p>This function creates a new <a href="net.html#net_class_net_socket"><code>net.Socket</code></a> with all options set to default, | |
+<p>This function creates a new <a href="#net_class_net_socket"><code>net.Socket</code></a> with all options set to default, | |
immediately initiates connection with | |
<a href="#net_socket_connect_path_connectlistener"><code>socket.connect(path[, connectListener])</code></a>, | |
then returns the <code>net.Socket</code> that starts the connection.</p> | |
@@ -32740,10 +32683,10 @@ | |
<a href="#net_net_createconnection"><code>net.createConnection()</code></a> functions, an "once" listener for the | |
<code>'connect'</code> event on the initiating socket. Will be passed to | |
<a href="#net_socket_connect_port_host_connectlistener"><code>socket.connect(path[, connectListener])</code></a>.</li> | |
-<li>Returns: <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> The newly created socket used to start the connection.</li> | |
+<li>Returns: <a href="#net_class_net_socket" class="type"><net.Socket></a> The newly created socket used to start the connection.</li> | |
</ul> | |
<p>Initiates a TCP connection.</p> | |
-<p>This function creates a new <a href="net.html#net_class_net_socket"><code>net.Socket</code></a> with all options set to default, | |
+<p>This function creates a new <a href="#net_class_net_socket"><code>net.Socket</code></a> with all options set to default, | |
immediately initiates connection with | |
<a href="#net_socket_connect_port_host_connectlistener"><code>socket.connect(port[, host][, connectListener])</code></a>, | |
then returns the <code>net.Socket</code> that starts the connection.</p> | |
@@ -32761,12 +32704,12 @@ | |
</li> | |
<li><code>connectionListener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Automatically set as a listener for the | |
<a href="#net_event_connection"><code>'connection'</code></a> event.</li> | |
-<li>Returns: <a href="net.html#net_class_net_server" class="type"><net.Server></a></li> | |
+<li>Returns: <a href="#net_class_net_server" class="type"><net.Server></a></li> | |
</ul> | |
<p>If <code>allowHalfOpen</code> is set to <code>true</code>, when the other end of the socket | |
sends a FIN packet, the server will only send a FIN packet back when | |
<a href="#net_socket_end_data_encoding"><code>socket.end()</code></a> is explicitly called, until then the connection is | |
-half-closed (non-readable but still writable). See <a href="#stream_event_end"><code>'end'</code></a> event | |
+half-closed (non-readable but still writable). See <a href="#net_event_end"><code>'end'</code></a> event | |
and <a href="https://tools.ietf.org/html/rfc1122">RFC 1122</a> (section 4.2.2.13) for more information.</p> | |
<p>If <code>pauseOnConnect</code> is set to <code>true</code>, then the socket associated with each | |
incoming connection will be paused, and no data will be read from its handle. | |
@@ -32774,7 +32717,7 @@ | |
read by the original process. To begin reading data from a paused socket, call | |
<a href="#net_socket_resume"><code>socket.resume()</code></a>.</p> | |
<p>The server can be a TCP server or an <a href="#net_ipc_support">IPC</a> server, depending on what it | |
-<a href="net.html#net_server_listen"><code>listen()</code></a> to.</p> | |
+<a href="#net_server_listen"><code>listen()</code></a> to.</p> | |
<p>Here is an example of an TCP echo server which listens for connections | |
on port 8124:</p> | |
<pre><code class="lang-js">const net = require('net'); | |
@@ -32829,11 +32772,9 @@ | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
</ul> | |
<p>Returns <code>true</code> if input is a version 6 IP address, otherwise returns <code>false</code>.</p> | |
-<!-- [end-include:net.md] --> | |
-<!-- [start-include:os.md] --> | |
<h1>OS<span><a class="mark" href="#os_os" id="os_os">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>os</code> module provides a number of operating system-related utility methods. | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>os</code> module provides a number of operating system-related utility methods. | |
It can be accessed using:</p> | |
<pre><code class="lang-js">const os = require('os'); | |
</code></pre> | |
@@ -32858,7 +32799,7 @@ | |
architecture for which the Node.js binary was compiled.</p> | |
<p>The current possible values are: <code>'arm'</code>, <code>'arm64'</code>, <code>'ia32'</code>, <code>'mips'</code>, | |
<code>'mipsel'</code>, <code>'ppc'</code>, <code>'ppc64'</code>, <code>'s390'</code>, <code>'s390x'</code>, <code>'x32'</code>, and <code>'x64'</code>.</p> | |
-<p>Equivalent to <a href="process.html#process_process_arch"><code>process.arch</code></a>.</p> | |
+<p>Equivalent to <a href="#process_process_arch"><code>process.arch</code></a>.</p> | |
<h2>os.constants<span><a class="mark" href="#os_os_constants" id="os_os_constants">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v6.3.0</span> | |
@@ -33115,7 +33056,7 @@ | |
<li><code>'sunos'</code></li> | |
<li><code>'win32'</code></li> | |
</ul> | |
-<p>Equivalent to <a href="process.html#process_process_platform"><code>process.platform</code></a>.</p> | |
+<p>Equivalent to <a href="#process_process_platform"><code>process.platform</code></a>.</p> | |
<p>The value <code>'android'</code> may also be returned if the Node.js is built on the | |
Android operating system. However, Android support in Node.js is considered | |
<a href="https://github.com/nodejs/node/blob/master/BUILDING.md#androidandroid-based-devices-eg-firefox-os">to be experimental</a> at this time.</p> | |
@@ -34001,12 +33942,9 @@ | |
<td></td> | |
</tr> | |
</table> | |
- | |
-<!-- [end-include:os.md] --> | |
-<!-- [start-include:path.md] --> | |
<h1>Path<span><a class="mark" href="#path_path" id="path_path">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>path</code> module provides utilities for working with file and directory paths. | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>path</code> module provides utilities for working with file and directory paths. | |
It can be accessed using:</p> | |
<pre><code class="lang-js">const path = require('path'); | |
</code></pre> | |
@@ -34070,7 +34008,7 @@ | |
path.basename('/foo/bar/baz/asdf/quux.html', '.html'); | |
// Returns: 'quux' | |
</code></pre> | |
-<p>A <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string or if <code>ext</code> is given | |
+<p>A <a href="#errors_class_typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string or if <code>ext</code> is given | |
and is not a string.</p> | |
<h2>path.delimiter<span><a class="mark" href="#path_path_delimiter" id="path_path_delimiter">#</a></span></h2> | |
<div class="api_metadata"> | |
@@ -34120,7 +34058,7 @@ | |
<pre><code class="lang-js">path.dirname('/foo/bar/baz/asdf/quux'); | |
// Returns: '/foo/bar/baz/asdf' | |
</code></pre> | |
-<p>A <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p> | |
+<p>A <a href="#errors_class_typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p> | |
<h2>path.extname(path)<span><a class="mark" href="#path_path_extname_path" id="path_path_extname_path">#</a></span></h2> | |
<div class="api_metadata"> | |
<details class="changelog"><summary>History</summary> | |
@@ -34158,7 +34096,7 @@ | |
path.extname('.index'); | |
// Returns: '' | |
</code></pre> | |
-<p>A <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p> | |
+<p>A <a href="#errors_class_typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p> | |
<h2>path.format(pathObject)<span><a class="mark" href="#path_path_format_pathobject" id="path_path_format_pathobject">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.11.15</span> | |
@@ -34241,7 +34179,7 @@ | |
path.isAbsolute('bar/baz'); // false | |
path.isAbsolute('.'); // false | |
</code></pre> | |
-<p>A <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p> | |
+<p>A <a href="#errors_class_typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p> | |
<h2>path.join([...paths])<span><a class="mark" href="#path_path_join_paths" id="path_path_join_paths">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.16</span> | |
@@ -34260,7 +34198,7 @@ | |
path.join('foo', {}, 'bar'); | |
// throws 'TypeError: Path must be a string. Received {}' | |
</code></pre> | |
-<p>A <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> is thrown if any of the path segments is not a string.</p> | |
+<p>A <a href="#errors_class_typeerror"><code>TypeError</code></a> is thrown if any of the path segments is not a string.</p> | |
<h2>path.normalize(path)<span><a class="mark" href="#path_path_normalize_path" id="path_path_normalize_path">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.23</span> | |
@@ -34289,7 +34227,7 @@ | |
<pre><code class="lang-js">path.win32.normalize('C:////temp\\\\/\\/\\/foo/bar'); | |
// Returns: 'C:\\temp\\foo\\bar' | |
</code></pre> | |
-<p>A <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p> | |
+<p>A <a href="#errors_class_typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p> | |
<h2>path.parse(path)<span><a class="mark" href="#path_path_parse_path" id="path_path_parse_path">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.11.15</span> | |
@@ -34342,7 +34280,7 @@ | |
└──────┴──────────────┴──────┴─────┘ | |
(all spaces in the "" line should be ignored — they are purely for formatting) | |
</code></pre> | |
-<p>A <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p> | |
+<p>A <a href="#errors_class_typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p> | |
<h2>path.posix<span><a class="mark" href="#path_path_posix" id="path_path_posix">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.11.15</span> | |
@@ -34382,7 +34320,7 @@ | |
<pre><code class="lang-js">path.relative('C:\\orandea\\test\\aaa', 'C:\\orandea\\impl\\bbb'); | |
// Returns: '..\\..\\impl\\bbb' | |
</code></pre> | |
-<p>A <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> is thrown if either <code>from</code> or <code>to</code> is not a string.</p> | |
+<p>A <a href="#errors_class_typeerror"><code>TypeError</code></a> is thrown if either <code>from</code> or <code>to</code> is not a string.</p> | |
<h2>path.resolve([...paths])<span><a class="mark" href="#path_path_resolve_paths" id="path_path_resolve_paths">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.3.4</span> | |
@@ -34413,7 +34351,7 @@ | |
// if the current working directory is /home/myself/node, | |
// this returns '/home/myself/node/wwwroot/static_files/gif/image.gif' | |
</code></pre> | |
-<p>A <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> is thrown if any of the arguments is not a string.</p> | |
+<p>A <a href="#errors_class_typeerror"><code>TypeError</code></a> is thrown if any of the arguments is not a string.</p> | |
<h2>path.sep<span><a class="mark" href="#path_path_sep" id="path_path_sep">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.7.9</span> | |
@@ -34456,11 +34394,9 @@ | |
</ul> | |
<p>The <code>path.win32</code> property provides access to Windows-specific implementations | |
of the <code>path</code> methods.</p> | |
-<!-- [end-include:path.md] --> | |
-<!-- [start-include:perf_hooks.md] --> | |
<h1>Performance Timing API<span><a class="mark" href="#perf_hooks_performance_timing_api" id="perf_hooks_performance_timing_api">#</a></span></h1> | |
<!--introduced_in=v8.5.0--> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>The Performance Timing API provides an implementation of the | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>The Performance Timing API provides an implementation of the | |
<a href="https://w3c.github.io/performance-timeline/">W3C Performance Timeline</a> specification. The purpose of the API | |
is to support collection of high resolution performance metrics. | |
This is the same Performance API as implemented in modern Web browsers.</p> | |
@@ -34525,7 +34461,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.5.0</span> | |
</div><ul> | |
-<li><a href="perf_hooks.html#perf_hooks_class_performancenodetiming_extends_performanceentry" class="type"><PerformanceNodeTiming></a></li> | |
+<li><a href="#perf_hooks_class_performancenodetiming_extends_performanceentry" class="type"><PerformanceNodeTiming></a></li> | |
</ul> | |
<p>An instance of the <code>PerformanceNodeTiming</code> class that provides performance | |
metrics for specific Node.js operational milestones.</p> | |
@@ -34676,8 +34612,8 @@ | |
<span>Added in: v8.5.0</span> | |
</div><ul> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a><ul> | |
-<li><code>list</code> <a href="perf_hooks.html#perf_hooks_class_performanceobserverentrylist" class="type"><PerformanceObserverEntryList></a></li> | |
-<li><code>observer</code> <a href="perf_hooks.html#perf_hooks_class_performanceobserver" class="type"><PerformanceObserver></a></li> | |
+<li><code>list</code> <a href="#perf_hooks_class_performanceobserverentrylist" class="type"><PerformanceObserverEntryList></a></li> | |
+<li><code>observer</code> <a href="#perf_hooks_class_performanceobserver" class="type"><PerformanceObserver></a></li> | |
</ul> | |
</li> | |
</ul> | |
@@ -34762,7 +34698,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v8.5.0</span> | |
</div><ul> | |
-<li>Returns: <a href="perf_hooks.html#perf_hooks_class_performanceentry" class="type"><PerformanceEntry[]></a></li> | |
+<li>Returns: <a href="#perf_hooks_class_performanceentry" class="type"><PerformanceEntry[]></a></li> | |
</ul> | |
<p>Returns a list of <code>PerformanceEntry</code> objects in chronological order | |
with respect to <code>performanceEntry.startTime</code>.</p> | |
@@ -34772,7 +34708,7 @@ | |
</div><ul> | |
<li><code>name</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
<li><code>type</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="perf_hooks.html#perf_hooks_class_performanceentry" class="type"><PerformanceEntry[]></a></li> | |
+<li>Returns: <a href="#perf_hooks_class_performanceentry" class="type"><PerformanceEntry[]></a></li> | |
</ul> | |
<p>Returns a list of <code>PerformanceEntry</code> objects in chronological order | |
with respect to <code>performanceEntry.startTime</code> whose <code>performanceEntry.name</code> is | |
@@ -34783,7 +34719,7 @@ | |
<span>Added in: v8.5.0</span> | |
</div><ul> | |
<li><code>type</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li>Returns: <a href="perf_hooks.html#perf_hooks_class_performanceentry" class="type"><PerformanceEntry[]></a></li> | |
+<li>Returns: <a href="#perf_hooks_class_performanceentry" class="type"><PerformanceEntry[]></a></li> | |
</ul> | |
<p>Returns a list of <code>PerformanceEntry</code> objects in chronological order | |
with respect to <code>performanceEntry.startTime</code> whose <code>performanceEntry.entryType</code> | |
@@ -34857,8 +34793,6 @@ | |
require('some-module'); | |
</code></pre> | |
-<!-- [end-include:perf_hooks.md] --> | |
-<!-- [start-include:process.md] --> | |
<h1>Process<span><a class="mark" href="#process_process" id="process_process">#</a></span></h1> | |
<!-- introduced_in=v0.10.0 --> | |
<!-- type=global --> | |
@@ -34866,7 +34800,7 @@ | |
over, the current Node.js process. As a global, it is always available to | |
Node.js applications without using <code>require()</code>.</p> | |
<h2>Process Events<span><a class="mark" href="#process_process_events" id="process_process_events">#</a></span></h2> | |
-<p>The <code>process</code> object is an instance of <a href="events.html"><code>EventEmitter</code></a>.</p> | |
+<p>The <code>process</code> object is an instance of <a href="#events_class_eventemitter"><code>EventEmitter</code></a>.</p> | |
<h3>Event: 'beforeExit'<span><a class="mark" href="#process_event_beforeexit" id="process_event_beforeexit">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.11.12</span> | |
@@ -34878,7 +34812,7 @@ | |
<p>The listener callback function is invoked with the value of | |
<a href="#process_process_exitcode"><code>process.exitCode</code></a> passed as the only argument.</p> | |
<p>The <code>'beforeExit'</code> event is <em>not</em> emitted for conditions causing explicit | |
-termination, such as calling <a href="process.html#process_process_exit_code"><code>process.exit()</code></a> or uncaught exceptions.</p> | |
+termination, such as calling <a href="#process_process_exit_code"><code>process.exit()</code></a> or uncaught exceptions.</p> | |
<p>The <code>'beforeExit'</code> should <em>not</em> be used as an alternative to the <code>'exit'</code> event | |
unless the intention is to schedule additional work.</p> | |
<h3>Event: 'disconnect'<span><a class="mark" href="#process_event_disconnect" id="process_event_disconnect">#</a></span></h3> | |
@@ -34903,7 +34837,7 @@ | |
all <code>'exit'</code> listeners have finished running the Node.js process will terminate.</p> | |
<p>The listener callback function is invoked with the exit code specified either | |
by the <a href="#process_process_exitcode"><code>process.exitCode</code></a> property, or the <code>exitCode</code> argument passed to the | |
-<a href="process.html#process_process_exit_code"><code>process.exit()</code></a> method.</p> | |
+<a href="#process_process_exit_code"><code>process.exit()</code></a> method.</p> | |
<pre><code class="lang-js">process.on('exit', (code) => { | |
console.log(`About to exit with code: ${code}`); | |
}); | |
@@ -34924,12 +34858,12 @@ | |
</div><ul> | |
<li><code>message</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> a parsed JSON object | |
or a serializable primitive value.</li> | |
-<li><code>sendHandle</code> <a href="net.html#net_class_net_server" class="type"><net.Server></a> | <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> a <a href="net.html#net_class_net_server"><code>net.Server</code></a> or <a href="net.html#net_class_net_socket"><code>net.Socket</code></a> | |
+<li><code>sendHandle</code> <a href="#net_class_net_server" class="type"><net.Server></a> | <a href="#net_class_net_socket" class="type"><net.Socket></a> a <a href="#net_class_net_server"><code>net.Server</code></a> or <a href="#net_class_net_socket"><code>net.Socket</code></a> | |
object, or undefined.</li> | |
</ul> | |
<p>If the Node.js process is spawned with an IPC channel (see the <a href="child_process.html">Child Process</a> | |
and <a href="cluster.html">Cluster</a> documentation), the <code>'message'</code> event is emitted whenever a | |
-message sent by a parent process using <a href="child_process.html#child_process_subprocess_send_message_sendhandle_options_callback"><code>childprocess.send()</code></a> is received by | |
+message sent by a parent process using <a href="#child_process_subprocess_send_message_sendhandle_options_callback"><code>childprocess.send()</code></a> is received by | |
the child process.</p> | |
<p>The message goes through serialization and parsing. The resulting message might | |
not be the same as what is originally sent.</p> | |
@@ -35039,7 +34973,7 @@ | |
<p>The listener function is called with the following arguments:</p> | |
<ul> | |
<li><code>reason</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> The object with which the promise was rejected | |
-(typically an <a href="errors.html#errors_class_error"><code>Error</code></a> object).</li> | |
+(typically an <a href="#errors_class_error"><code>Error</code></a> object).</li> | |
<li><code>p</code> the <code>Promise</code> that was rejected.</li> | |
</ul> | |
<pre><code class="lang-js">process.on('unhandledRejection', (reason, p) => { | |
@@ -35185,7 +35119,7 @@ | |
underlying problem.</li> | |
</ul> | |
<p>Windows does not support sending signals, but Node.js offers some emulation | |
-with <a href="#process_process_kill_pid_signal"><code>process.kill()</code></a>, and <a href="child_process.html#child_process_subprocess_kill_signal"><code>subprocess.kill()</code></a>. Sending signal <code>0</code> can | |
+with <a href="#process_process_kill_pid_signal"><code>process.kill()</code></a>, and <a href="#child_process_subprocess_kill_signal"><code>subprocess.kill()</code></a>. Sending signal <code>0</code> can | |
be used to test for the existence of a process. Sending <code>SIGINT</code>, <code>SIGTERM</code>, | |
and <code>SIGKILL</code> cause the unconditional termination of the target process.</p> | |
<h2>process.abort()<span><a class="mark" href="#process_process_abort" id="process_process_abort">#</a></span></h2> | |
@@ -35384,7 +35318,7 @@ | |
IPC channel to the parent process, allowing the child process to exit gracefully | |
once there are no other connections keeping it alive.</p> | |
<p>The effect of calling <code>process.disconnect()</code> is that same as calling the parent | |
-process's <a href="child_process.html#child_process_subprocess_disconnect"><code>ChildProcess.disconnect()</code></a>.</p> | |
+process's <a href="#child_process_subprocess_disconnect"><code>ChildProcess.disconnect()</code></a>.</p> | |
<p>If the Node.js process was not spawned with an IPC channel, | |
<code>process.disconnect()</code> will be <code>undefined</code>.</p> | |
<h2>process.dlopen(module, filename[, flags])<span><a class="mark" href="#process_process_dlopen_module_filename_flags" id="process_process_dlopen_module_filename_flags">#</a></span></h2> | |
@@ -35403,17 +35337,17 @@ | |
</div><ul> | |
<li><code>module</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> | |
<li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
-<li><code>flags</code> <a href="os.html#os_dlopen_constants" class="type"><os.constants.dlopen></a> <strong>Default:</strong> <code>os.constants.dlopen.RTLD_LAZY</code></li> | |
+<li><code>flags</code> <a href="#os_dlopen_constants" class="type"><os.constants.dlopen></a> <strong>Default:</strong> <code>os.constants.dlopen.RTLD_LAZY</code></li> | |
</ul> | |
<p>The <code>process.dlopen()</code> method allows to dynamically load shared | |
objects. It is primarily used by <code>require()</code> to load | |
C++ Addons, and should not be used directly, except in special | |
-cases. In other words, <a href="globals.html#globals_require"><code>require()</code></a> should be preferred over | |
+cases. In other words, <a href="#globals_require"><code>require()</code></a> should be preferred over | |
<code>process.dlopen()</code>, unless there are specific reasons.</p> | |
<p>The <code>flags</code> argument is an integer that allows to specify dlopen | |
-behavior. See the <a href="os.html#os_dlopen_constants"><code>os.constants.dlopen</code></a> documentation for details.</p> | |
+behavior. See the <a href="#os_dlopen_constants"><code>os.constants.dlopen</code></a> documentation for details.</p> | |
<p>If there are specific reasons to use <code>process.dlopen()</code> (for instance, | |
-to specify dlopen flags), it's often useful to use <a href="modules.html#modules_require_resolve_request_options"><code>require.resolve()</code></a> | |
+to specify dlopen flags), it's often useful to use <a href="#modules_require_resolve_request_options"><code>require.resolve()</code></a> | |
to look up the module's path.</p> | |
<p>An important drawback when calling <code>process.dlopen()</code> is that the <code>module</code> | |
instance must be passed. Functions exported by the C++ Addon will be accessible | |
@@ -35702,9 +35636,9 @@ | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a></li> | |
</ul> | |
<p>A number which will be the process exit code, when the process either | |
-exits gracefully, or is exited via <a href="process.html#process_process_exit_code"><code>process.exit()</code></a> without specifying | |
+exits gracefully, or is exited via <a href="#process_process_exit_code"><code>process.exit()</code></a> without specifying | |
a code.</p> | |
-<p>Specifying a code to <a href="process.html#process_process_exit_code"><code>process.exit(code)</code></a> will override any | |
+<p>Specifying a code to <a href="#process_process_exit_code"><code>process.exit(code)</code></a> will override any | |
previous setting of <code>process.exitCode</code>.</p> | |
<h2>process.getegid()<span><a class="mark" href="#process_process_getegid" id="process_process_getegid">#</a></span></h2> | |
<div class="api_metadata"> | |
@@ -35777,7 +35711,7 @@ | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
</ul> | |
<p>Indicates whether a callback has been set using | |
-<a href="process.html#process_process_setuncaughtexceptioncapturecallback_fn"><code>process.setUncaughtExceptionCaptureCallback()</code></a>.</p> | |
+<a href="#process_process_setuncaughtexceptioncapturecallback_fn"><code>process.setUncaughtExceptionCaptureCallback()</code></a>.</p> | |
<h2>process.hrtime([time])<span><a class="mark" href="#process_process_hrtime_time" id="process_process_hrtime_time">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.7.6</span> | |
@@ -35892,11 +35826,11 @@ | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> | |
</ul> | |
<p>The <code>process.mainModule</code> property provides an alternative way of retrieving | |
-<a href="modules.html#modules_accessing_the_main_module"><code>require.main</code></a>. The difference is that if the main module changes at | |
-runtime, <a href="modules.html#modules_accessing_the_main_module"><code>require.main</code></a> may still refer to the original main module in | |
+<a href="#modules_accessing_the_main_module"><code>require.main</code></a>. The difference is that if the main module changes at | |
+runtime, <a href="#modules_accessing_the_main_module"><code>require.main</code></a> may still refer to the original main module in | |
modules that were required before the change occurred. Generally, it's | |
safe to assume that the two refer to the same module.</p> | |
-<p>As with <a href="modules.html#modules_accessing_the_main_module"><code>require.main</code></a>, <code>process.mainModule</code> will be <code>undefined</code> if there | |
+<p>As with <a href="#modules_accessing_the_main_module"><code>require.main</code></a>, <code>process.mainModule</code> will be <code>undefined</code> if there | |
is no entry script.</p> | |
<h2>process.memoryUsage()<span><a class="mark" href="#process_process_memoryusage" id="process_process_memoryusage">#</a></span></h2> | |
<div class="api_metadata"> | |
@@ -35964,7 +35898,7 @@ | |
<p>The <code>process.nextTick()</code> method adds the <code>callback</code> to the "next tick queue". | |
Once the current turn of the event loop turn runs to completion, all callbacks | |
currently in the next tick queue will be called.</p> | |
-<p>This is <em>not</em> a simple alias to <a href="timers.html#timers_settimeout_callback_delay_args"><code>setTimeout(fn, 0)</code></a>. It is much more | |
+<p>This is <em>not</em> a simple alias to <a href="#timers_settimeout_callback_delay_args"><code>setTimeout(fn, 0)</code></a>. It is much more | |
efficient. It runs before any additional I/O events (including | |
timers) fire in subsequent ticks of the event loop.</p> | |
<pre><code class="lang-js">console.log('start'); | |
@@ -36140,14 +36074,14 @@ | |
<span>Added in: v0.5.9</span> | |
</div><ul> | |
<li><code>message</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> | |
-<li><code>sendHandle</code> <a href="net.html#net_class_net_server" class="type"><net.Server></a> | <a href="net.html#net_class_net_socket" class="type"><net.Socket></a></li> | |
+<li><code>sendHandle</code> <a href="#net_class_net_server" class="type"><net.Server></a> | <a href="#net_class_net_socket" class="type"><net.Socket></a></li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a></li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
</ul> | |
<p>If Node.js is spawned with an IPC channel, the <code>process.send()</code> method can be | |
used to send messages to the parent process. Messages will be received as a | |
-<a href="child_process.html#child_process_event_message"><code>'message'</code></a> event on the parent's <a href="child_process.html#child_process_class_childprocess"><code>ChildProcess</code></a> object.</p> | |
+<a href="#child_process_event_message"><code>'message'</code></a> event on the parent's <a href="#child_process_class_childprocess"><code>ChildProcess</code></a> object.</p> | |
<p>If Node.js was not spawned with an IPC channel, <code>process.send()</code> will be | |
<code>undefined</code>.</p> | |
<p>The message goes through serialization and parsing. The resulting message might | |
@@ -36263,9 +36197,9 @@ | |
<p>The <code>process.setUncaughtExceptionCaptureCallback()</code> function sets a function | |
that will be invoked when an uncaught exception occurs, which will receive the | |
exception value itself as its first argument.</p> | |
-<p>If such a function is set, the <a href="process.html#process_event_uncaughtexception"><code>'uncaughtException'</code></a> event will | |
+<p>If such a function is set, the <a href="#process_event_uncaughtexception"><code>'uncaughtException'</code></a> event will | |
not be emitted. If <code>--abort-on-uncaught-exception</code> was passed from the | |
-command line or set through <a href="v8.html#v8_v8_setflagsfromstring_flags"><code>v8.setFlagsFromString()</code></a>, the process will | |
+command line or set through <a href="#v8_v8_setflagsfromstring_flags"><code>v8.setFlagsFromString()</code></a>, the process will | |
not abort.</p> | |
<p>To unset the capture function, | |
<code>process.setUncaughtExceptionCaptureCallback(null)</code> may be used. Calling this | |
@@ -36275,23 +36209,23 @@ | |
<a href="domain.html"><code>domain</code></a> built-in module.</p> | |
<h2>process.stderr<span><a class="mark" href="#process_process_stderr" id="process_process_stderr">#</a></span></h2> | |
<ul> | |
-<li><a href="stream.html#stream_stream" class="type"><Stream></a></li> | |
+<li><a href="#stream_stream" class="type"><Stream></a></li> | |
</ul> | |
<p>The <code>process.stderr</code> property returns a stream connected to | |
-<code>stderr</code> (fd <code>2</code>). It is a <a href="net.html#net_class_net_socket"><code>net.Socket</code></a> (which is a <a href="stream.html#stream_duplex_and_transform_streams">Duplex</a> | |
+<code>stderr</code> (fd <code>2</code>). It is a <a href="#net_class_net_socket"><code>net.Socket</code></a> (which is a <a href="#stream_duplex_and_transform_streams">Duplex</a> | |
stream) unless fd <code>2</code> refers to a file, in which case it is | |
-a <a href="stream.html#stream_writable_streams">Writable</a> stream.</p> | |
+a <a href="#stream_writable_streams">Writable</a> stream.</p> | |
<p><code>process.stderr</code> differs from other Node.js streams in important ways, see | |
-<a href="process.html#process_a_note_on_process_i_o">note on process I/O</a> for more information.</p> | |
+<a href="#process_a_note_on_process_i_o">note on process I/O</a> for more information.</p> | |
<p>This feature is not available in <a href="#worker_threads_class_worker"><code>Worker</code></a> threads.</p> | |
<h2>process.stdin<span><a class="mark" href="#process_process_stdin" id="process_process_stdin">#</a></span></h2> | |
<ul> | |
-<li><a href="stream.html#stream_stream" class="type"><Stream></a></li> | |
+<li><a href="#stream_stream" class="type"><Stream></a></li> | |
</ul> | |
<p>The <code>process.stdin</code> property returns a stream connected to | |
-<code>stdin</code> (fd <code>0</code>). It is a <a href="net.html#net_class_net_socket"><code>net.Socket</code></a> (which is a <a href="stream.html#stream_duplex_and_transform_streams">Duplex</a> | |
+<code>stdin</code> (fd <code>0</code>). It is a <a href="#net_class_net_socket"><code>net.Socket</code></a> (which is a <a href="#stream_duplex_and_transform_streams">Duplex</a> | |
stream) unless fd <code>0</code> refers to a file, in which case it is | |
-a <a href="stream.html#stream_readable_streams">Readable</a> stream.</p> | |
+a <a href="#stream_readable_streams">Readable</a> stream.</p> | |
<pre><code class="lang-js">process.stdin.setEncoding('utf8'); | |
process.stdin.on('readable', () => { | |
@@ -36305,34 +36239,34 @@ | |
process.stdout.write('end'); | |
}); | |
</code></pre> | |
-<p>As a <a href="stream.html#stream_duplex_and_transform_streams">Duplex</a> stream, <code>process.stdin</code> can also be used in "old" mode that | |
+<p>As a <a href="#stream_duplex_and_transform_streams">Duplex</a> stream, <code>process.stdin</code> can also be used in "old" mode that | |
is compatible with scripts written for Node.js prior to v0.10. | |
-For more information see <a href="stream.html#stream_compatibility_with_older_node_js_versions">Stream compatibility</a>.</p> | |
+For more information see <a href="#stream_compatibility_with_older_node_js_versions">Stream compatibility</a>.</p> | |
<p>In "old" streams mode the <code>stdin</code> stream is paused by default, so one | |
must call <code>process.stdin.resume()</code> to read from it. Note also that calling | |
<code>process.stdin.resume()</code> itself would switch stream to "old" mode.</p> | |
<p>This feature is not available in <a href="#worker_threads_class_worker"><code>Worker</code></a> threads.</p> | |
<h2>process.stdout<span><a class="mark" href="#process_process_stdout" id="process_process_stdout">#</a></span></h2> | |
<ul> | |
-<li><a href="stream.html#stream_stream" class="type"><Stream></a></li> | |
+<li><a href="#stream_stream" class="type"><Stream></a></li> | |
</ul> | |
<p>The <code>process.stdout</code> property returns a stream connected to | |
-<code>stdout</code> (fd <code>1</code>). It is a <a href="net.html#net_class_net_socket"><code>net.Socket</code></a> (which is a <a href="stream.html#stream_duplex_and_transform_streams">Duplex</a> | |
+<code>stdout</code> (fd <code>1</code>). It is a <a href="#net_class_net_socket"><code>net.Socket</code></a> (which is a <a href="#stream_duplex_and_transform_streams">Duplex</a> | |
stream) unless fd <code>1</code> refers to a file, in which case it is | |
-a <a href="stream.html#stream_writable_streams">Writable</a> stream.</p> | |
+a <a href="#stream_writable_streams">Writable</a> stream.</p> | |
<p>For example, to copy <code>process.stdin</code> to <code>process.stdout</code>:</p> | |
<pre><code class="lang-js">process.stdin.pipe(process.stdout); | |
</code></pre> | |
<p><code>process.stdout</code> differs from other Node.js streams in important ways, see | |
-<a href="process.html#process_a_note_on_process_i_o">note on process I/O</a> for more information.</p> | |
+<a href="#process_a_note_on_process_i_o">note on process I/O</a> for more information.</p> | |
<p>This feature is not available in <a href="#worker_threads_class_worker"><code>Worker</code></a> threads.</p> | |
<h3>A note on process I/O<span><a class="mark" href="#process_a_note_on_process_i_o" id="process_a_note_on_process_i_o">#</a></span></h3> | |
<p><code>process.stdout</code> and <code>process.stderr</code> differ from other Node.js streams in | |
important ways:</p> | |
<ol> | |
-<li>They are used internally by <a href="console.html#console_console_log_data_args"><code>console.log()</code></a> and <a href="console.html#console_console_error_data_args"><code>console.error()</code></a>, | |
+<li>They are used internally by <a href="#console_console_log_data_args"><code>console.log()</code></a> and <a href="#console_console_error_data_args"><code>console.error()</code></a>, | |
respectively.</li> | |
-<li>They cannot be closed (<a href="stream.html#stream_writable_end_chunk_encoding_callback"><code>end()</code></a> will throw).</li> | |
+<li>They cannot be closed (<a href="#stream_writable_end_chunk_encoding_callback"><code>end()</code></a> will throw).</li> | |
<li>They will never emit the <a href="#stream_event_finish"><code>'finish'</code></a> event.</li> | |
<li>Writes may be synchronous depending on what the stream is connected to | |
and whether the system is Windows or POSIX:<ul> | |
@@ -36347,7 +36281,7 @@ | |
<p>Synchronous writes avoid problems such as output written with <code>console.log()</code> or | |
<code>console.error()</code> being unexpectedly interleaved, or not written at all if | |
<code>process.exit()</code> is called before an asynchronous write completes. See | |
-<a href="process.html#process_process_exit_code"><code>process.exit()</code></a> for more information.</p> | |
+<a href="#process_process_exit_code"><code>process.exit()</code></a> for more information.</p> | |
<p><strong><em>Warning</em></strong>: Synchronous writes block the event loop until the write has | |
completed. This can be near instantaneous in the case of output to a file, but | |
under high system load, pipes that are not being read at the receiving end, or | |
@@ -36356,7 +36290,7 @@ | |
impacts. This may not be a problem when writing to an interactive terminal | |
session, but consider this particularly careful when doing production logging to | |
the process output streams.</p> | |
-<p>To check if a stream is connected to a <a href="tty.html">TTY</a> context, check the <code>isTTY</code> | |
+<p>To check if a stream is connected to a <a href="#tty_tty">TTY</a> context, check the <code>isTTY</code> | |
property.</p> | |
<p>For instance:</p> | |
<pre><code class="lang-console">$ node -p "Boolean(process.stdin.isTTY)" | |
@@ -36368,7 +36302,7 @@ | |
$ node -p "Boolean(process.stdout.isTTY)" | cat | |
false | |
</code></pre> | |
-<p>See the <a href="tty.html">TTY</a> documentation for more information.</p> | |
+<p>See the <a href="#tty_tty">TTY</a> documentation for more information.</p> | |
<h2>process.throwDeprecation<span><a class="mark" href="#process_process_throwdeprecation" id="process_process_throwdeprecation">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.9.12</span> | |
@@ -36492,7 +36426,7 @@ | |
cases:</p> | |
<ul> | |
<li><code>1</code> <strong>Uncaught Fatal Exception</strong> - There was an uncaught exception, | |
-and it was not handled by a domain or an <a href="process.html#process_event_uncaughtexception"><code>'uncaughtException'</code></a> event | |
+and it was not handled by a domain or an <a href="#process_event_uncaughtexception"><code>'uncaughtException'</code></a> event | |
handler.</li> | |
<li><code>2</code> - Unused (reserved by Bash for builtin misuse)</li> | |
<li><code>3</code> <strong>Internal JavaScript Parse Error</strong> - The JavaScript source code | |
@@ -36512,7 +36446,7 @@ | |
<li><code>7</code> <strong>Internal Exception Handler Run-Time Failure</strong> - There was an | |
uncaught exception, and the internal fatal exception handler | |
function itself threw an error while attempting to handle it. This | |
-can happen, for example, if an <a href="process.html#process_event_uncaughtexception"><code>'uncaughtException'</code></a> or | |
+can happen, for example, if an <a href="#process_event_uncaughtexception"><code>'uncaughtException'</code></a> or | |
<code>domain.on('error')</code> handler throws an error.</li> | |
<li><code>8</code> - Unused. In previous versions of Node.js, exit code 8 sometimes | |
indicated an uncaught exception.</li> | |
@@ -36532,8 +36466,6 @@ | |
For example, signal <code>SIGABRT</code> has value <code>6</code>, so the expected exit | |
code will be <code>128</code> + <code>6</code>, or <code>134</code>.</li> | |
</ul> | |
-<!-- [end-include:process.md] --> | |
-<!-- [start-include:punycode.md] --> | |
<h1>Punycode<span><a class="mark" href="#punycode_punycode" id="punycode_punycode">#</a></span></h1> | |
<div class="api_metadata"> | |
<details class="changelog"><summary>History</summary> | |
@@ -36545,7 +36477,7 @@ | |
</table> | |
</details> | |
</div><!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated</div><p><strong>The version of the punycode module bundled in Node.js is being deprecated</strong>. | |
+<div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated</div><p><strong>The version of the punycode module bundled in Node.js is being deprecated</strong>. | |
In a future major version of Node.js this module will be removed. Users | |
currently depending on the <code>punycode</code> module should switch to using the | |
userland-provided <a href="https://mths.be/punycode">Punycode.js</a> module instead.</p> | |
@@ -36553,7 +36485,7 @@ | |
can be accessed using:</p> | |
<pre><code class="lang-js">const punycode = require('punycode'); | |
</code></pre> | |
-<p><a href="https://tools.ietf.org/html/rfc5891#section-4.4">Punycode</a> is a character encoding scheme defined by RFC 3492 that is | |
+<p><a href="https://tools.ietf.org/html/rfc3492">Punycode</a> is a character encoding scheme defined by RFC 3492 that is | |
primarily intended for use in Internationalized Domain Names. Because host | |
names in URLs are limited to ASCII characters only, Domain Names that contain | |
non-ASCII characters must be converted into ASCII using the Punycode scheme. | |
@@ -36571,7 +36503,7 @@ | |
</div><ul> | |
<li><code>string</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
-<p>The <code>punycode.decode()</code> method converts a <a href="https://tools.ietf.org/html/rfc5891#section-4.4">Punycode</a> string of ASCII-only | |
+<p>The <code>punycode.decode()</code> method converts a <a href="https://tools.ietf.org/html/rfc3492">Punycode</a> string of ASCII-only | |
characters to the equivalent string of Unicode codepoints.</p> | |
<pre><code class="lang-js">punycode.decode('maana-pta'); // 'mañana' | |
punycode.decode('--dqo34k'); // '☃-⌘' | |
@@ -36583,7 +36515,7 @@ | |
<li><code>string</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>The <code>punycode.encode()</code> method converts a string of Unicode codepoints to a | |
-<a href="https://tools.ietf.org/html/rfc5891#section-4.4">Punycode</a> string of ASCII-only characters.</p> | |
+<a href="https://tools.ietf.org/html/rfc3492">Punycode</a> string of ASCII-only characters.</p> | |
<pre><code class="lang-js">punycode.encode('mañana'); // 'maana-pta' | |
punycode.encode('☃-⌘'); // '--dqo34k' | |
</code></pre> | |
@@ -36594,7 +36526,7 @@ | |
<li><code>domain</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>The <code>punycode.toASCII()</code> method converts a Unicode string representing an | |
-Internationalized Domain Name to <a href="https://tools.ietf.org/html/rfc5891#section-4.4">Punycode</a>. Only the non-ASCII parts of the | |
+Internationalized Domain Name to <a href="https://tools.ietf.org/html/rfc3492">Punycode</a>. Only the non-ASCII parts of the | |
domain name will be converted. Calling <code>punycode.toASCII()</code> on a string that | |
already only contains ASCII characters will have no effect.</p> | |
<pre><code class="lang-js">// encode domain names | |
@@ -36609,7 +36541,7 @@ | |
<li><code>domain</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>The <code>punycode.toUnicode()</code> method converts a string representing a domain name | |
-containing <a href="https://tools.ietf.org/html/rfc5891#section-4.4">Punycode</a> encoded characters into Unicode. Only the <a href="https://tools.ietf.org/html/rfc5891#section-4.4">Punycode</a> | |
+containing <a href="https://tools.ietf.org/html/rfc3492">Punycode</a> encoded characters into Unicode. Only the <a href="https://tools.ietf.org/html/rfc3492">Punycode</a> | |
encoded parts of the domain name are be converted.</p> | |
<pre><code class="lang-js">// decode domain names | |
punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com' | |
@@ -36649,11 +36581,9 @@ | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Returns a string identifying the current <a href="https://mths.be/punycode">Punycode.js</a> version number.</p> | |
-<!-- [end-include:punycode.md] --> | |
-<!-- [start-include:querystring.md] --> | |
<h1>Query String<span><a class="mark" href="#querystring_query_string" id="querystring_query_string">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><!--name=querystring--> | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><!--name=querystring--> | |
<p>The <code>querystring</code> module provides utilities for parsing and formatting URL | |
query strings. It can be accessed using:</p> | |
<pre><code class="lang-js">const querystring = require('querystring'); | |
@@ -36778,12 +36708,10 @@ | |
<p>By default, the <code>querystring.unescape()</code> method will attempt to use the | |
JavaScript built-in <code>decodeURIComponent()</code> method to decode. If that fails, | |
a safer equivalent that does not throw on malformed URLs will be used.</p> | |
-<!-- [end-include:querystring.md] --> | |
-<!-- [start-include:readline.md] --> | |
<h1>Readline<span><a class="mark" href="#readline_readline" id="readline_readline">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>readline</code> module provides an interface for reading data from a <a href="stream.html#stream_readable_streams">Readable</a> | |
-stream (such as <a href="process.html#process_process_stdin"><code>process.stdin</code></a>) one line at a time. It can be accessed using:</p> | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>readline</code> module provides an interface for reading data from a <a href="#stream_readable_streams">Readable</a> | |
+stream (such as <a href="#process_process_stdin"><code>process.stdin</code></a>) one line at a time. It can be accessed using:</p> | |
<pre><code class="lang-js">const readline = require('readline'); | |
</code></pre> | |
<p>The following simple example illustrates the basic use of the <code>readline</code> module.</p> | |
@@ -36809,7 +36737,7 @@ | |
<span>Added in: v0.1.104</span> | |
</div><p>Instances of the <code>readline.Interface</code> class are constructed using the | |
<code>readline.createInterface()</code> method. Every instance is associated with a | |
-single <code>input</code> <a href="stream.html#stream_readable_streams">Readable</a> stream and a single <code>output</code> <a href="stream.html#stream_writable_streams">Writable</a> stream. | |
+single <code>input</code> <a href="#stream_readable_streams">Readable</a> stream and a single <code>output</code> <a href="#stream_writable_streams">Writable</a> stream. | |
The <code>output</code> stream is used to print prompts for user input that arrives on, | |
and is read from, the <code>input</code> stream.</p> | |
<h3>Event: 'close'<span><a class="mark" href="#readline_event_close" id="readline_event_close">#</a></span></h3> | |
@@ -36846,7 +36774,7 @@ | |
<ul> | |
<li>The <code>input</code> stream is paused.</li> | |
<li>The <code>input</code> stream is not paused and receives the <code>'SIGCONT'</code> event. (See | |
-events <a href="readline.html#readline_event_sigtstp"><code>'SIGTSTP'</code></a> and <a href="readline.html#readline_event_sigcont"><code>'SIGCONT'</code></a>.)</li> | |
+events <a href="#readline_event_sigtstp"><code>'SIGTSTP'</code></a> and <a href="#readline_event_sigcont"><code>'SIGCONT'</code></a>.)</li> | |
</ul> | |
<p>The listener function is called without passing any arguments.</p> | |
<pre><code class="lang-js">rl.on('pause', () => { | |
@@ -37004,7 +36932,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.7.7</span> | |
</div><ul> | |
-<li><code>stream</code> <a href="stream.html#stream_class_stream_writable" class="type"><stream.Writable></a></li> | |
+<li><code>stream</code> <a href="#stream_class_stream_writable" class="type"><stream.Writable></a></li> | |
<li><code>dir</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a><ul> | |
<li><code>-1</code> - to the left from cursor</li> | |
<li><code>1</code> - to the right from cursor</li> | |
@@ -37018,7 +36946,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.7.7</span> | |
</div><ul> | |
-<li><code>stream</code> <a href="stream.html#stream_class_stream_writable" class="type"><stream.Writable></a></li> | |
+<li><code>stream</code> <a href="#stream_class_stream_writable" class="type"><stream.Writable></a></li> | |
</ul> | |
<p>The <code>readline.clearScreenDown()</code> method clears the given <a href="tty.html">TTY</a> stream from | |
the current position of the cursor down.</p> | |
@@ -37046,9 +36974,9 @@ | |
</details> | |
</div><ul> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
-<li><code>input</code> <a href="stream.html#stream_class_stream_readable" class="type"><stream.Readable></a> The <a href="stream.html#stream_readable_streams">Readable</a> stream to listen to. This option | |
+<li><code>input</code> <a href="#stream_class_stream_readable" class="type"><stream.Readable></a> The <a href="#stream_readable_streams">Readable</a> stream to listen to. This option | |
is <em>required</em>.</li> | |
-<li><code>output</code> <a href="stream.html#stream_class_stream_writable" class="type"><stream.Writable></a> The <a href="stream.html#stream_writable_streams">Writable</a> stream to write readline data | |
+<li><code>output</code> <a href="#stream_class_stream_writable" class="type"><stream.Writable></a> The <a href="#stream_writable_streams">Writable</a> stream to write readline data | |
to.</li> | |
<li><code>completer</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> An optional function used for Tab autocompletion.</li> | |
<li><code>terminal</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> <code>true</code> if the <code>input</code> and <code>output</code> streams should be | |
@@ -37089,7 +37017,7 @@ | |
<p>If <code>terminal</code> is <code>true</code> for this instance then the <code>output</code> stream will get | |
the best compatibility if it defines an <code>output.columns</code> property and emits | |
a <code>'resize'</code> event on the <code>output</code> if or when the columns ever change | |
-(<a href="process.html#process_process_stdout"><code>process.stdout</code></a> does this automatically when it is a TTY).</p> | |
+(<a href="#process_process_stdout"><code>process.stdout</code></a> does this automatically when it is a TTY).</p> | |
<h3>Use of the <code>completer</code> Function<span><a class="mark" href="#readline_use_of_the_completer_function" id="readline_use_of_the_completer_function">#</a></span></h3> | |
<p>The <code>completer</code> function takes the current line entered by the user | |
as an argument, and returns an <code>Array</code> with 2 entries:</p> | |
@@ -37115,7 +37043,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.7.7</span> | |
</div><ul> | |
-<li><code>stream</code> <a href="stream.html#stream_class_stream_writable" class="type"><stream.Writable></a></li> | |
+<li><code>stream</code> <a href="#stream_class_stream_writable" class="type"><stream.Writable></a></li> | |
<li><code>x</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
<li><code>y</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
</ul> | |
@@ -37125,10 +37053,10 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.7.7</span> | |
</div><ul> | |
-<li><code>stream</code> <a href="stream.html#stream_class_stream_readable" class="type"><stream.Readable></a></li> | |
-<li><code>interface</code> <a href="readline.html#readline_class_interface" class="type"><readline.Interface></a></li> | |
+<li><code>stream</code> <a href="#stream_class_stream_readable" class="type"><stream.Readable></a></li> | |
+<li><code>interface</code> <a href="#readline_class_interface" class="type"><readline.Interface></a></li> | |
</ul> | |
-<p>The <code>readline.emitKeypressEvents()</code> method causes the given <a href="stream.html#stream_readable_streams">Readable</a> | |
+<p>The <code>readline.emitKeypressEvents()</code> method causes the given <a href="#stream_readable_streams">Readable</a> | |
stream to begin emitting <code>'keypress'</code> events corresponding to received input.</p> | |
<p>Optionally, <code>interface</code> specifies a <code>readline.Interface</code> instance for which | |
autocompletion is disabled when copy-pasted input is detected.</p> | |
@@ -37144,7 +37072,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.7.7</span> | |
</div><ul> | |
-<li><code>stream</code> <a href="stream.html#stream_class_stream_writable" class="type"><stream.Writable></a></li> | |
+<li><code>stream</code> <a href="#stream_class_stream_writable" class="type"><stream.Writable></a></li> | |
<li><code>dx</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
<li><code>dy</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
</ul> | |
@@ -37179,7 +37107,7 @@ | |
</code></pre> | |
<h2>Example: Read File Stream Line-by-Line<span><a class="mark" href="#readline_example_read_file_stream_line_by_line" id="readline_example_read_file_stream_line_by_line">#</a></span></h2> | |
<p>A common use case for <code>readline</code> is to consume input from a filesystem | |
-<a href="stream.html#stream_readable_streams">Readable</a> stream one line at a time, as illustrated in the following | |
+<a href="#stream_readable_streams">Readable</a> stream one line at a time, as illustrated in the following | |
example:</p> | |
<pre><code class="lang-js">const readline = require('readline'); | |
const fs = require('fs'); | |
@@ -37193,11 +37121,9 @@ | |
console.log(`Line from file: ${line}`); | |
}); | |
</code></pre> | |
-<!-- [end-include:readline.md] --> | |
-<!-- [start-include:repl.md] --> | |
<h1>REPL<span><a class="mark" href="#repl_repl" id="repl_repl">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>repl</code> module provides a Read-Eval-Print-Loop (REPL) implementation that | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>repl</code> module provides a Read-Eval-Print-Loop (REPL) implementation that | |
is available both as a standalone program or includible in other applications. | |
It can be accessed using:</p> | |
<pre><code class="lang-js">const repl = require('repl'); | |
@@ -37207,7 +37133,7 @@ | |
of <code>repl.REPLServer</code> will accept individual lines of user input, evaluate those | |
according to a user-defined evaluation function, then output the result. Input | |
and output may be from <code>stdin</code> and <code>stdout</code>, respectively, or may be connected | |
-to any Node.js <a href="stream.html#stream_stream">stream</a>.</p> | |
+to any Node.js <a href="stream.html">stream</a>.</p> | |
<p>Instances of <code>repl.REPLServer</code> support automatic completion of inputs, | |
simplistic Emacs-style line editing, multi-line inputs, ANSI-styled output, | |
saving and restoring current REPL session state, error recovery, and | |
@@ -37309,9 +37235,9 @@ | |
REPL session.</p> | |
<p>This use of the <a href="domain.html"><code>domain</code></a> module in the REPL has these side effects:</p> | |
<ul> | |
-<li>Uncaught exceptions do not emit the <a href="process.html#process_event_uncaughtexception"><code>'uncaughtException'</code></a> event.</li> | |
-<li>Trying to use <a href="process.html#process_process_setuncaughtexceptioncapturecallback_fn"><code>process.setUncaughtExceptionCaptureCallback()</code></a> throws | |
-an <a href="errors.html#errors_err_domain_cannot_set_uncaught_exception_capture"><code>ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE</code></a> error.</li> | |
+<li>Uncaught exceptions do not emit the <a href="#process_event_uncaughtexception"><code>'uncaughtException'</code></a> event.</li> | |
+<li>Trying to use <a href="#process_process_setuncaughtexceptioncapturecallback_fn"><code>process.setUncaughtExceptionCaptureCallback()</code></a> throws | |
+an <a href="#errors_err_domain_cannot_set_uncaught_exception_capture"><code>ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE</code></a> error.</li> | |
</ul> | |
<h4>Assignment of the <code>_</code> (underscore) variable<span><a class="mark" href="#repl_assignment_of_the_underscore_variable" id="repl_assignment_of_the_underscore_variable">#</a></span></h4> | |
<div class="api_metadata"> | |
@@ -37348,7 +37274,7 @@ | |
'foo' | |
</code></pre> | |
<h4><code>await</code> keyword<span><a class="mark" href="#repl_await_keyword" id="repl_await_keyword">#</a></span></h4> | |
-<p>With the <a href="cli.html#cli_experimental_repl_await"><code>--experimental-repl-await</code></a> command line option specified, | |
+<p>With the <a href="#cli_experimental_repl_await"><code>--experimental-repl-await</code></a> command line option specified, | |
experimental support for the <code>await</code> keyword is enabled.</p> | |
<!-- eslint-skip --> | |
<pre><code class="lang-js">> await Promise.resolve(123) | |
@@ -37427,7 +37353,7 @@ | |
<h2>Class: REPLServer<span><a class="mark" href="#repl_class_replserver" id="repl_class_replserver">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.1.91</span> | |
-</div><p>The <code>repl.REPLServer</code> class inherits from the <a href="readline.html#readline_class_interface"><code>readline.Interface</code></a> class. | |
+</div><p>The <code>repl.REPLServer</code> class inherits from the <a href="#readline_class_interface"><code>readline.Interface</code></a> class. | |
Instances of <code>repl.REPLServer</code> are created using the <code>repl.start()</code> method and | |
<em>should not</em> be created directly using the JavaScript <code>new</code> keyword.</p> | |
<h3>Event: 'exit'<span><a class="mark" href="#repl_event_exit" id="repl_event_exit">#</a></span></h3> | |
@@ -37548,7 +37474,7 @@ | |
<li><code>rest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> any parameters to the keyword command</li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a></li> | |
</ul> | |
-<div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated.</div><p>An internal method used to parse and execute <code>REPLServer</code> keywords. | |
+<div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated.</div><p>An internal method used to parse and execute <code>REPLServer</code> keywords. | |
Returns <code>true</code> if <code>keyword</code> is a valid keyword, otherwise <code>false</code>.</p> | |
<h2>repl.start([options])<span><a class="mark" href="#repl_repl_start_options" id="repl_repl_start_options">#</a></span></h2> | |
<div class="api_metadata"> | |
@@ -37570,9 +37496,9 @@ | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a><ul> | |
<li><code>prompt</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The input prompt to display. <strong>Default:</strong> <code>'> '</code> | |
(with a trailing space).</li> | |
-<li><code>input</code> <a href="stream.html#stream_class_stream_readable" class="type"><stream.Readable></a> The <code>Readable</code> stream from which REPL input will | |
+<li><code>input</code> <a href="#stream_class_stream_readable" class="type"><stream.Readable></a> The <code>Readable</code> stream from which REPL input will | |
be read. <strong>Default:</strong> <code>process.stdin</code>.</li> | |
-<li><code>output</code> <a href="stream.html#stream_class_stream_writable" class="type"><stream.Writable></a> The <code>Writable</code> stream to which REPL output will | |
+<li><code>output</code> <a href="#stream_class_stream_writable" class="type"><stream.Writable></a> The <code>Writable</code> stream to which REPL output will | |
be written. <strong>Default:</strong> <code>process.stdout</code>.</li> | |
<li><code>terminal</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> If <code>true</code>, specifies that the <code>output</code> should be | |
treated as a TTY terminal, and have ANSI/VT100 escape codes written to it. | |
@@ -37596,7 +37522,7 @@ | |
<li><code>writer</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> The function to invoke to format the output of each | |
command before writing to <code>output</code>. <strong>Default:</strong> <a href="#util_util_inspect_object_options"><code>util.inspect()</code></a>.</li> | |
<li><code>completer</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> An optional function used for custom Tab auto | |
- completion. See <a href="readline.html#readline_use_of_the_completer_function"><code>readline.InterfaceCompleter</code></a> for an example.</li> | |
+ completion. See <a href="#readline_use_of_the_completer_function"><code>readline.InterfaceCompleter</code></a> for an example.</li> | |
<li><code>replMode</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Symbol_type" class="type"><symbol></a> A flag that specifies whether the default evaluator | |
executes all JavaScript commands in strict mode or default (sloppy) mode. | |
Acceptable values are:<ul> | |
@@ -37710,18 +37636,16 @@ | |
<a href="https://gist.github.com/2209310">https://gist.github.com/2209310</a>.</p> | |
<p>For an example of running a REPL instance over <a href="https://curl.haxx.se/docs/manpage.html">curl(1)</a>, see: | |
<a href="https://gist.github.com/2053342">https://gist.github.com/2053342</a>.</p> | |
-<!-- [end-include:repl.md] --> | |
-<!-- [start-include:stream.md] --> | |
<h1>Stream<span><a class="mark" href="#stream_stream" id="stream_stream">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>A stream is an abstract interface for working with streaming data in Node.js. | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>A stream is an abstract interface for working with streaming data in Node.js. | |
The <code>stream</code> module provides a base API that makes it easy to build objects | |
that implement the stream interface.</p> | |
<p>There are many stream objects provided by Node.js. For instance, a | |
-<a href="http.html#http_class_http_incomingmessage">request to an HTTP server</a> and <a href="process.html#process_process_stdout"><code>process.stdout</code></a> | |
+<a href="#http_class_http_incomingmessage">request to an HTTP server</a> and <a href="#process_process_stdout"><code>process.stdout</code></a> | |
are both stream instances.</p> | |
<p>Streams can be readable, writable, or both. All streams are instances of | |
-<a href="events.html"><code>EventEmitter</code></a>.</p> | |
+<a href="#events_class_eventemitter"><code>EventEmitter</code></a>.</p> | |
<p>The <code>stream</code> module can be accessed using:</p> | |
<pre><code class="lang-js">const stream = require('stream'); | |
</code></pre> | |
@@ -37738,13 +37662,13 @@ | |
<p>There are four fundamental stream types within Node.js:</p> | |
<ul> | |
<li><a href="#stream_class_stream_writable"><code>Writable</code></a> - streams to which data can be written (for example | |
-<a href="fs.html#fs_fs_createwritestream_path_options"><code>fs.createWriteStream()</code></a>).</li> | |
+<a href="#fs_fs_createwritestream_path_options"><code>fs.createWriteStream()</code></a>).</li> | |
<li><a href="#stream_class_stream_readable"><code>Readable</code></a> - streams from which data can be read (for example | |
-<a href="fs.html#fs_fs_createreadstream_path_options"><code>fs.createReadStream()</code></a>).</li> | |
+<a href="#fs_fs_createreadstream_path_options"><code>fs.createReadStream()</code></a>).</li> | |
<li><a href="#stream_class_stream_duplex"><code>Duplex</code></a> - streams that are both <code>Readable</code> and <code>Writable</code> (for example | |
-<a href="net.html#net_class_net_socket"><code>net.Socket</code></a>).</li> | |
+<a href="#net_class_net_socket"><code>net.Socket</code></a>).</li> | |
<li><a href="#stream_class_stream_transform"><code>Transform</code></a> - <code>Duplex</code> streams that can modify or transform the data as it | |
-is written and read (for example <a href="zlib.html#zlib_zlib_createdeflate_options"><code>zlib.createDeflate()</code></a>).</li> | |
+is written and read (for example <a href="#zlib_zlib_createdeflate_options"><code>zlib.createDeflate()</code></a>).</li> | |
</ul> | |
<p>Additionally this module includes the utility functions <a href="#stream_stream_pipeline_streams_callback">pipeline</a> and | |
<a href="#stream_stream_finished_stream_callback">finished</a>.</p> | |
@@ -37788,7 +37712,7 @@ | |
<code>Writable</code>, each maintain <em>two</em> separate internal buffers used for reading and | |
writing, allowing each side to operate independently of the other while | |
maintaining an appropriate and efficient flow of data. For example, | |
-<a href="net.html#net_class_net_socket"><code>net.Socket</code></a> instances are <a href="#stream_class_stream_duplex"><code>Duplex</code></a> streams whose <code>Readable</code> side allows | |
+<a href="#net_class_net_socket"><code>net.Socket</code></a> instances are <a href="#stream_class_stream_duplex"><code>Duplex</code></a> streams whose <code>Readable</code> side allows | |
consumption of data received <em>from</em> the socket and whose <code>Writable</code> side allows | |
writing data <em>to</em> the socket. Because data may be written to the socket at a | |
faster or slower rate than data is received, it is important for each side to | |
@@ -37840,10 +37764,10 @@ | |
</code></pre> | |
<p><a href="#stream_class_stream_writable"><code>Writable</code></a> streams (such as <code>res</code> in the example) expose methods such as | |
<code>write()</code> and <code>end()</code> that are used to write data onto the stream.</p> | |
-<p><a href="#stream_class_stream_readable"><code>Readable</code></a> streams use the <a href="events.html"><code>EventEmitter</code></a> API for notifying application | |
+<p><a href="#stream_class_stream_readable"><code>Readable</code></a> streams use the <a href="#events_class_eventemitter"><code>EventEmitter</code></a> API for notifying application | |
code when data is available to be read off the stream. That available data can | |
be read from the stream in multiple ways.</p> | |
-<p>Both <a href="#stream_class_stream_writable"><code>Writable</code></a> and <a href="#stream_class_stream_readable"><code>Readable</code></a> streams use the <a href="events.html"><code>EventEmitter</code></a> API in | |
+<p>Both <a href="#stream_class_stream_writable"><code>Writable</code></a> and <a href="#stream_class_stream_readable"><code>Readable</code></a> streams use the <a href="#events_class_eventemitter"><code>EventEmitter</code></a> API in | |
various ways to communicate the current state of the stream.</p> | |
<p><a href="#stream_class_stream_duplex"><code>Duplex</code></a> and <a href="#stream_class_stream_transform"><code>Transform</code></a> streams are both <a href="#stream_class_stream_writable"><code>Writable</code></a> and | |
<a href="#stream_class_stream_readable"><code>Readable</code></a>.</p> | |
@@ -37857,14 +37781,14 @@ | |
written.</p> | |
<p>Examples of <a href="#stream_class_stream_writable"><code>Writable</code></a> streams include:</p> | |
<ul> | |
-<li><a href="http.html#http_class_http_clientrequest">HTTP requests, on the client</a></li> | |
-<li><a href="http.html#http_class_http_serverresponse">HTTP responses, on the server</a></li> | |
-<li><a href="fs.html#fs_class_fs_writestream">fs write streams</a></li> | |
+<li><a href="#http_class_http_clientrequest">HTTP requests, on the client</a></li> | |
+<li><a href="#http_class_http_serverresponse">HTTP responses, on the server</a></li> | |
+<li><a href="#fs_class_fs_writestream">fs write streams</a></li> | |
<li><a href="zlib.html">zlib streams</a></li> | |
<li><a href="crypto.html">crypto streams</a></li> | |
-<li><a href="net.html#net_class_net_socket">TCP sockets</a></li> | |
-<li><a href="child_process.html#child_process_subprocess_stdin">child process stdin</a></li> | |
-<li><a href="process.html#process_process_stdout"><code>process.stdout</code></a>, <a href="process.html#process_process_stderr"><code>process.stderr</code></a></li> | |
+<li><a href="#net_class_net_socket">TCP sockets</a></li> | |
+<li><a href="#child_process_subprocess_stdin">child process stdin</a></li> | |
+<li><a href="#process_process_stdout"><code>process.stdout</code></a>, <a href="#process_process_stderr"><code>process.stderr</code></a></li> | |
</ul> | |
<p>Some of these examples are actually <a href="#stream_class_stream_duplex"><code>Duplex</code></a> streams that implement the | |
<a href="#stream_class_stream_writable"><code>Writable</code></a> interface.</p> | |
@@ -37948,7 +37872,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.9.4</span> | |
</div><ul> | |
-<li><code>src</code> <a href="stream.html#stream_class_stream_readable" class="type"><stream.Readable></a> source stream that is piping to this writable</li> | |
+<li><code>src</code> <a href="#stream_class_stream_readable" class="type"><stream.Readable></a> source stream that is piping to this writable</li> | |
</ul> | |
<p>The <code>'pipe'</code> event is emitted when the <a href="#stream_readable_pipe_destination_options"><code>stream.pipe()</code></a> method is called on | |
a readable stream, adding this writable to its set of destinations.</p> | |
@@ -37964,7 +37888,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.9.4</span> | |
</div><ul> | |
-<li><code>src</code> <a href="stream.html#stream_class_stream_readable" class="type"><stream.Readable></a> The source stream that | |
+<li><code>src</code> <a href="#stream_class_stream_readable" class="type"><stream.Readable></a> The source stream that | |
<a href="#stream_readable_unpipe_destination">unpiped</a> this writable</li> | |
</ul> | |
<p>The <code>'unpipe'</code> event is emitted when the <a href="#stream_readable_unpipe_destination"><code>stream.unpipe()</code></a> method is called | |
@@ -38021,7 +37945,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>chunk</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> Optional data to write. For streams | |
+<li><code>chunk</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> Optional data to write. For streams | |
not operating in object mode, <code>chunk</code> must be a string, <code>Buffer</code> or | |
<code>Uint8Array</code>. For object mode streams, <code>chunk</code> may be any JavaScript value | |
other than <code>null</code>.</li> | |
@@ -38121,7 +38045,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>chunk</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> Optional data to write. For streams | |
+<li><code>chunk</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> Optional data to write. For streams | |
not operating in object mode, <code>chunk</code> must be a string, <code>Buffer</code> or | |
<code>Uint8Array</code>. For object mode streams, <code>chunk</code> may be any JavaScript value | |
other than <code>null</code>.</li> | |
@@ -38180,14 +38104,14 @@ | |
consumed.</p> | |
<p>Examples of <code>Readable</code> streams include:</p> | |
<ul> | |
-<li><a href="http.html#http_class_http_incomingmessage">HTTP responses, on the client</a></li> | |
-<li><a href="http.html#http_class_http_incomingmessage">HTTP requests, on the server</a></li> | |
-<li><a href="fs.html#fs_class_fs_readstream">fs read streams</a></li> | |
+<li><a href="#http_class_http_incomingmessage">HTTP responses, on the client</a></li> | |
+<li><a href="#http_class_http_incomingmessage">HTTP requests, on the server</a></li> | |
+<li><a href="#fs_class_fs_readstream">fs read streams</a></li> | |
<li><a href="zlib.html">zlib streams</a></li> | |
<li><a href="crypto.html">crypto streams</a></li> | |
-<li><a href="net.html#net_class_net_socket">TCP sockets</a></li> | |
-<li><a href="child_process.html#child_process_subprocess_stdout">child process stdout and stderr</a></li> | |
-<li><a href="process.html#process_process_stdin"><code>process.stdin</code></a></li> | |
+<li><a href="#net_class_net_socket">TCP sockets</a></li> | |
+<li><a href="#child_process_subprocess_stdout">child process stdout and stderr</a></li> | |
+<li><a href="#process_process_stdin"><code>process.stdin</code></a></li> | |
</ul> | |
<p>All <a href="#stream_class_stream_readable"><code>Readable</code></a> streams implement the interface defined by the | |
<code>stream.Readable</code> class.</p> | |
@@ -38195,7 +38119,7 @@ | |
<p><code>Readable</code> streams effectively operate in one of two modes: flowing and paused.</p> | |
<p>When in flowing mode, data is read from the underlying system automatically | |
and provided to an application as quickly as possible using events via the | |
-<a href="events.html"><code>EventEmitter</code></a> interface.</p> | |
+<a href="#events_class_eventemitter"><code>EventEmitter</code></a> interface.</p> | |
<p>In paused mode, the <a href="#stream_readable_read_size"><code>stream.read()</code></a> method must be called | |
explicitly to read chunks of data from the stream.</p> | |
<p>All <a href="#stream_class_stream_readable"><code>Readable</code></a> streams begin in paused mode but can be switched to flowing | |
@@ -38270,7 +38194,7 @@ | |
<p>Use of the <code>readable.pipe()</code> method is recommended for most users as it has been | |
implemented to provide the easiest way of consuming stream data. Developers that | |
require more fine-grained control over the transfer and generation of data can | |
-use the <a href="events.html"><code>EventEmitter</code></a> and <code>readable.pause()</code>/<code>readable.resume()</code> APIs.</p> | |
+use the <a href="#events_class_eventemitter"><code>EventEmitter</code></a> and <code>readable.pause()</code>/<code>readable.resume()</code> APIs.</p> | |
<h4>Class: stream.Readable<span><a class="mark" href="#stream_class_stream_readable" id="stream_class_stream_readable">#</a></span></h4> | |
<div class="api_metadata"> | |
<span>Added in: v0.9.4</span> | |
@@ -38286,7 +38210,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.9.4</span> | |
</div><ul> | |
-<li><code>chunk</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> The chunk of data. For streams that are not | |
+<li><code>chunk</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> The chunk of data. For streams that are not | |
operating in object mode, the chunk will be either a string or <code>Buffer</code>. | |
For streams that are in object mode, the chunk can be any JavaScript value | |
other than <code>null</code>.</li> | |
@@ -38447,12 +38371,12 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.9.4</span> | |
</div><ul> | |
-<li><code>destination</code> <a href="stream.html#stream_class_stream_writable" class="type"><stream.Writable></a> The destination for writing data</li> | |
+<li><code>destination</code> <a href="#stream_class_stream_writable" class="type"><stream.Writable></a> The destination for writing data</li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> Pipe options<ul> | |
<li><code>end</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> End the writer when the reader ends. <strong>Default:</strong> <code>true</code>.</li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="stream.html#stream_class_stream_writable" class="type"><stream.Writable></a> making it possible to set up chains of piped | |
+<li>Returns: <a href="#stream_class_stream_writable" class="type"><stream.Writable></a> making it possible to set up chains of piped | |
streams</li> | |
</ul> | |
<p>The <code>readable.pipe()</code> method attaches a <a href="#stream_class_stream_writable"><code>Writable</code></a> stream to the <code>readable</code>, | |
@@ -38492,14 +38416,14 @@ | |
processing, the <code>Writable</code> destination <em>is not closed</em> automatically. If an | |
error occurs, it will be necessary to <em>manually</em> close each stream in order | |
to prevent memory leaks.</p> | |
-<p>The <a href="process.html#process_process_stderr"><code>process.stderr</code></a> and <a href="process.html#process_process_stdout"><code>process.stdout</code></a> <code>Writable</code> streams are never | |
+<p>The <a href="#process_process_stderr"><code>process.stderr</code></a> and <a href="#process_process_stdout"><code>process.stdout</code></a> <code>Writable</code> streams are never | |
closed until the Node.js process exits, regardless of the specified options.</p> | |
<h5>readable.read([size])<span><a class="mark" href="#stream_readable_read_size" id="stream_readable_read_size">#</a></span></h5> | |
<div class="api_metadata"> | |
<span>Added in: v0.9.4</span> | |
</div><ul> | |
<li><code>size</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Optional argument to specify how much data to read.</li> | |
-<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a></li> | |
+<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a></li> | |
</ul> | |
<p>The <code>readable.read()</code> method pulls some data out of the internal buffer and | |
returns it. If no data available to be read, <code>null</code> is returned. By default, | |
@@ -38606,7 +38530,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.9.4</span> | |
</div><ul> | |
-<li><code>destination</code> <a href="stream.html#stream_class_stream_writable" class="type"><stream.Writable></a> Optional specific stream to unpipe</li> | |
+<li><code>destination</code> <a href="#stream_class_stream_writable" class="type"><stream.Writable></a> Optional specific stream to unpipe</li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this" class="type"><this></a></li> | |
</ul> | |
<p>The <code>readable.unpipe()</code> method detaches a <code>Writable</code> stream previously attached | |
@@ -38641,7 +38565,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>chunk</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> Chunk of data to unshift onto the | |
+<li><code>chunk</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> Chunk of data to unshift onto the | |
read queue. For streams not operating in object mode, <code>chunk</code> must be a | |
string, <code>Buffer</code> or <code>Uint8Array</code>. For object mode streams, <code>chunk</code> may be | |
any JavaScript value other than <code>null</code>.</li> | |
@@ -38701,7 +38625,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.9.4</span> | |
</div><ul> | |
-<li><code>stream</code> <a href="stream.html#stream_stream" class="type"><Stream></a> An "old style" readable stream</li> | |
+<li><code>stream</code> <a href="#stream_stream" class="type"><Stream></a> An "old style" readable stream</li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this" class="type"><this></a></li> | |
</ul> | |
<p>Versions of Node.js prior to v0.10 had streams that did not implement the | |
@@ -38726,7 +38650,7 @@ | |
<h5>readable[Symbol.asyncIterator]()<span><a class="mark" href="#stream_readable_symbol_asynciterator" id="stream_readable_symbol_asynciterator">#</a></span></h5> | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
-</div><div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><ul> | |
+</div><div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><ul> | |
<li>Returns: <a href="https://github.com/tc39/proposal-async-iteration" class="type"><AsyncIterator></a> to fully consume the stream.</li> | |
</ul> | |
<pre><code class="lang-js">const fs = require('fs'); | |
@@ -38747,7 +38671,7 @@ | |
fully. The stream will be read in chunks of size equal to the <code>highWaterMark</code> | |
option. In the code example above, data will be in a single chunk if the file | |
has less then 64kb of data because no <code>highWaterMark</code> option is provided to | |
-<a href="fs.html#fs_fs_createreadstream_path_options"><code>fs.createReadStream()</code></a>.</p> | |
+<a href="#fs_fs_createreadstream_path_options"><code>fs.createReadStream()</code></a>.</p> | |
<h3>Duplex and Transform Streams<span><a class="mark" href="#stream_duplex_and_transform_streams" id="stream_duplex_and_transform_streams">#</a></span></h3> | |
<h4>Class: stream.Duplex<span><a class="mark" href="#stream_class_stream_duplex" id="stream_class_stream_duplex">#</a></span></h4> | |
<div class="api_metadata"> | |
@@ -38767,7 +38691,7 @@ | |
<a href="#stream_class_stream_writable"><code>Writable</code></a> interfaces.</p> | |
<p>Examples of <code>Duplex</code> streams include:</p> | |
<ul> | |
-<li><a href="net.html#net_class_net_socket">TCP sockets</a></li> | |
+<li><a href="#net_class_net_socket">TCP sockets</a></li> | |
<li><a href="zlib.html">zlib streams</a></li> | |
<li><a href="crypto.html">crypto streams</a></li> | |
</ul> | |
@@ -38795,7 +38719,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>stream</code> <a href="stream.html#stream_stream" class="type"><Stream></a> A readable and/or writable stream.</li> | |
+<li><code>stream</code> <a href="#stream_stream" class="type"><Stream></a> A readable and/or writable stream.</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> A callback function that takes an optional error | |
argument.</li> | |
</ul> | |
@@ -38835,7 +38759,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.0.0</span> | |
</div><ul> | |
-<li><code>...streams</code> <a href="stream.html#stream_stream" class="type"><Stream></a> Two or more streams to pipe between.</li> | |
+<li><code>...streams</code> <a href="#stream_stream" class="type"><Stream></a> Two or more streams to pipe between.</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Called when the pipeline is fully done.<ul> | |
<li><code>err</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a></li> | |
</ul> | |
@@ -39065,7 +38989,7 @@ | |
</code></pre> | |
<h4>writable._write(chunk, encoding, callback)<span><a class="mark" href="#stream_writable_write_chunk_encoding_callback_1" id="stream_writable_write_chunk_encoding_callback_1">#</a></span></h4> | |
<ul> | |
-<li><code>chunk</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> The chunk to be written. Will <strong>always</strong> | |
+<li><code>chunk</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> The chunk to be written. Will <strong>always</strong> | |
be a buffer unless the <code>decodeStrings</code> option was set to <code>false</code> | |
or the stream is operating in object mode.</li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> If the chunk is a string, then <code>encoding</code> is the | |
@@ -39332,7 +39256,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>chunk</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> Chunk of data to push into the | |
+<li><code>chunk</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type"><null></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> Chunk of data to push into the | |
read queue. For streams not operating in object mode, <code>chunk</code> must be a | |
string, <code>Buffer</code> or <code>Uint8Array</code>. For object mode streams, <code>chunk</code> may be | |
any JavaScript value.</li> | |
@@ -39667,7 +39591,7 @@ | |
user programs.</p> | |
<h4>transform._transform(chunk, encoding, callback)<span><a class="mark" href="#stream_transform_transform_chunk_encoding_callback" id="stream_transform_transform_chunk_encoding_callback">#</a></span></h4> | |
<ul> | |
-<li><code>chunk</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> The chunk to be transformed. Will <strong>always</strong> | |
+<li><code>chunk</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> The chunk to be transformed. Will <strong>always</strong> | |
be a buffer unless the <code>decodeStrings</code> option was set to <code>false</code> | |
or the stream is operating in object mode.</li> | |
<li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> If the chunk is a string, then this is the | |
@@ -39799,11 +39723,9 @@ | |
<p>This is not a problem in common cases with <code>latin1</code> or <code>ascii</code>. But it is | |
advised to be mindful about this behavior when working with strings that could | |
contain multi-byte characters.</p> | |
-<!-- [end-include:stream.md] --> | |
-<!-- [start-include:string_decoder.md] --> | |
<h1>String Decoder<span><a class="mark" href="#string_decoder_string_decoder" id="string_decoder_string_decoder">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>string_decoder</code> module provides an API for decoding <code>Buffer</code> objects into | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>string_decoder</code> module provides an API for decoding <code>Buffer</code> objects into | |
strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 | |
characters. It can be accessed using:</p> | |
<pre><code class="lang-js">const { StringDecoder } = require('string_decoder'); | |
@@ -39844,7 +39766,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.9.3</span> | |
</div><ul> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> A <code>Buffer</code> containing the bytes to decode.</li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> A <code>Buffer</code> containing the bytes to decode.</li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Returns any remaining input stored in the internal buffer as a string. Bytes | |
@@ -39866,30 +39788,28 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>buffer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> A <code>Buffer</code> containing the bytes to decode.</li> | |
+<li><code>buffer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> A <code>Buffer</code> containing the bytes to decode.</li> | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li> | |
</ul> | |
<p>Returns a decoded string, ensuring that any incomplete multibyte characters at | |
the end of the <code>Buffer</code> are omitted from the returned string and stored in an | |
internal buffer for the next call to <code>stringDecoder.write()</code> or | |
<code>stringDecoder.end()</code>.</p> | |
-<!-- [end-include:string_decoder.md] --> | |
-<!-- [start-include:timers.md] --> | |
<h1>Timers<span><a class="mark" href="#timers_timers" id="timers_timers">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>timer</code> module exposes a global API for scheduling functions to | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>timer</code> module exposes a global API for scheduling functions to | |
be called at some future period of time. Because the timer functions are | |
globals, there is no need to call <code>require('timers')</code> to use the API.</p> | |
<p>The timer functions within Node.js implement a similar API as the timers API | |
provided by Web Browsers but use a different internal implementation that is | |
built around <a href="https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick">the Node.js Event Loop</a>.</p> | |
<h2>Class: Immediate<span><a class="mark" href="#timers_class_immediate" id="timers_class_immediate">#</a></span></h2> | |
-<p>This object is created internally and is returned from <a href="timers.html#timers_setimmediate_callback_args"><code>setImmediate()</code></a>. It | |
-can be passed to <a href="timers.html#timers_clearimmediate_immediate"><code>clearImmediate()</code></a> in order to cancel the scheduled | |
+<p>This object is created internally and is returned from <a href="#timers_setimmediate_callback_args"><code>setImmediate()</code></a>. It | |
+can be passed to <a href="#timers_clearimmediate_immediate"><code>clearImmediate()</code></a> in order to cancel the scheduled | |
actions.</p> | |
<p>By default, when an immediate is scheduled, the Node.js event loop will continue | |
running as long as the immediate is active. The <code>Immediate</code> object returned by | |
-<a href="timers.html#timers_setimmediate_callback_args"><code>setImmediate()</code></a> exports both <code>immediate.ref()</code> and <code>immediate.unref()</code> | |
+<a href="#timers_setimmediate_callback_args"><code>setImmediate()</code></a> exports both <code>immediate.ref()</code> and <code>immediate.unref()</code> | |
functions that can be used to control this default behavior.</p> | |
<h3>immediate.hasRef()<span><a class="mark" href="#timers_immediate_hasref" id="timers_immediate_hasref">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -39902,7 +39822,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v9.7.0</span> | |
</div><ul> | |
-<li>Returns: <a href="timers.html#timers_class_immediate" class="type"><Immediate></a> a reference to <code>immediate</code></li> | |
+<li>Returns: <a href="#timers_class_immediate" class="type"><Immediate></a> a reference to <code>immediate</code></li> | |
</ul> | |
<p>When called, requests that the Node.js event loop <em>not</em> exit so long as the | |
<code>Immediate</code> is active. Calling <code>immediate.ref()</code> multiple times will have no | |
@@ -39913,18 +39833,18 @@ | |
<div class="api_metadata"> | |
<span>Added in: v9.7.0</span> | |
</div><ul> | |
-<li>Returns: <a href="timers.html#timers_class_immediate" class="type"><Immediate></a> a reference to <code>immediate</code></li> | |
+<li>Returns: <a href="#timers_class_immediate" class="type"><Immediate></a> a reference to <code>immediate</code></li> | |
</ul> | |
<p>When called, the active <code>Immediate</code> object will not require the Node.js event | |
loop to remain active. If there is no other activity keeping the event loop | |
running, the process may exit before the <code>Immediate</code> object's callback is | |
invoked. Calling <code>immediate.unref()</code> multiple times will have no effect.</p> | |
<h2>Class: Timeout<span><a class="mark" href="#timers_class_timeout" id="timers_class_timeout">#</a></span></h2> | |
-<p>This object is created internally and is returned from <a href="timers.html#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a> and | |
-<a href="timers.html#timers_setinterval_callback_delay_args"><code>setInterval()</code></a>. It can be passed to either <a href="timers.html#timers_cleartimeout_timeout"><code>clearTimeout()</code></a> or | |
-<a href="timers.html#timers_clearinterval_timeout"><code>clearInterval()</code></a> in order to cancel the scheduled actions.</p> | |
-<p>By default, when a timer is scheduled using either <a href="timers.html#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a> or | |
-<a href="timers.html#timers_setinterval_callback_delay_args"><code>setInterval()</code></a>, the Node.js event loop will continue running as long as the | |
+<p>This object is created internally and is returned from <a href="#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a> and | |
+<a href="#timers_setinterval_callback_delay_args"><code>setInterval()</code></a>. It can be passed to either <a href="#timers_cleartimeout_timeout"><code>clearTimeout()</code></a> or | |
+<a href="#timers_clearinterval_timeout"><code>clearInterval()</code></a> in order to cancel the scheduled actions.</p> | |
+<p>By default, when a timer is scheduled using either <a href="#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a> or | |
+<a href="#timers_setinterval_callback_delay_args"><code>setInterval()</code></a>, the Node.js event loop will continue running as long as the | |
timer is active. Each of the <code>Timeout</code> objects returned by these functions | |
export both <code>timeout.ref()</code> and <code>timeout.unref()</code> functions that can be used to | |
control this default behavior.</p> | |
@@ -39939,7 +39859,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.9.1</span> | |
</div><ul> | |
-<li>Returns: <a href="timers.html#timers_class_timeout" class="type"><Timeout></a> a reference to <code>timeout</code></li> | |
+<li>Returns: <a href="#timers_class_timeout" class="type"><Timeout></a> a reference to <code>timeout</code></li> | |
</ul> | |
<p>When called, requests that the Node.js event loop <em>not</em> exit so long as the | |
<code>Timeout</code> is active. Calling <code>timeout.ref()</code> multiple times will have no effect.</p> | |
@@ -39949,7 +39869,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v10.2.0</span> | |
</div><ul> | |
-<li>Returns: <a href="timers.html#timers_class_timeout" class="type"><Timeout></a> a reference to <code>timeout</code></li> | |
+<li>Returns: <a href="#timers_class_timeout" class="type"><Timeout></a> a reference to <code>timeout</code></li> | |
</ul> | |
<p>Sets the timer's start time to the current time, and reschedules the timer to | |
call its callback at the previously specified duration adjusted to the current | |
@@ -39961,7 +39881,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v0.9.1</span> | |
</div><ul> | |
-<li>Returns: <a href="timers.html#timers_class_timeout" class="type"><Timeout></a> a reference to <code>timeout</code></li> | |
+<li>Returns: <a href="#timers_class_timeout" class="type"><Timeout></a> a reference to <code>timeout</code></li> | |
</ul> | |
<p>When called, the active <code>Timeout</code> object will not require the Node.js event loop | |
to remain active. If there is no other activity keeping the event loop running, | |
@@ -39982,7 +39902,7 @@ | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> The function to call at the end of this turn of | |
<a href="https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick">the Node.js Event Loop</a></li> | |
<li><code>...args</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> Optional arguments to pass when the <code>callback</code> is called.</li> | |
-<li>Returns: <a href="timers.html#timers_class_immediate" class="type"><Immediate></a> for use with <a href="timers.html#timers_clearimmediate_immediate"><code>clearImmediate()</code></a></li> | |
+<li>Returns: <a href="#timers_class_immediate" class="type"><Immediate></a> for use with <a href="#timers_clearimmediate_immediate"><code>clearImmediate()</code></a></li> | |
</ul> | |
<p>Schedules the "immediate" execution of the <code>callback</code> after I/O events' | |
callbacks.</p> | |
@@ -39991,7 +39911,7 @@ | |
queue is processed every event loop iteration. If an immediate timer is queued | |
from inside an executing callback, that timer will not be triggered until the | |
next event loop iteration.</p> | |
-<p>If <code>callback</code> is not a function, a <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> will be thrown.</p> | |
+<p>If <code>callback</code> is not a function, a <a href="#errors_class_typeerror"><code>TypeError</code></a> will be thrown.</p> | |
<p>This method has a custom variant for promises that is available using | |
<a href="#util_util_promisify_original"><code>util.promisify()</code></a>:</p> | |
<pre><code class="lang-js">const util = require('util'); | |
@@ -40018,12 +39938,12 @@ | |
<li><code>delay</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> The number of milliseconds to wait before calling the | |
<code>callback</code>.</li> | |
<li><code>...args</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> Optional arguments to pass when the <code>callback</code> is called.</li> | |
-<li>Returns: <a href="timers.html#timers_class_timeout" class="type"><Timeout></a> for use with <a href="timers.html#timers_clearinterval_timeout"><code>clearInterval()</code></a></li> | |
+<li>Returns: <a href="#timers_class_timeout" class="type"><Timeout></a> for use with <a href="#timers_clearinterval_timeout"><code>clearInterval()</code></a></li> | |
</ul> | |
<p>Schedules repeated execution of <code>callback</code> every <code>delay</code> milliseconds.</p> | |
<p>When <code>delay</code> is larger than <code>2147483647</code> or less than <code>1</code>, the <code>delay</code> will be | |
set to <code>1</code>.</p> | |
-<p>If <code>callback</code> is not a function, a <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> will be thrown.</p> | |
+<p>If <code>callback</code> is not a function, a <a href="#errors_class_typeerror"><code>TypeError</code></a> will be thrown.</p> | |
<h3>setTimeout(callback, delay[, ...args])<span><a class="mark" href="#timers_settimeout_callback_delay_args" id="timers_settimeout_callback_delay_args">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.0.1</span> | |
@@ -40032,7 +39952,7 @@ | |
<li><code>delay</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> The number of milliseconds to wait before calling the | |
<code>callback</code>.</li> | |
<li><code>...args</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type"><any></a> Optional arguments to pass when the <code>callback</code> is called.</li> | |
-<li>Returns: <a href="timers.html#timers_class_timeout" class="type"><Timeout></a> for use with <a href="timers.html#timers_cleartimeout_timeout"><code>clearTimeout()</code></a></li> | |
+<li>Returns: <a href="#timers_class_timeout" class="type"><Timeout></a> for use with <a href="#timers_cleartimeout_timeout"><code>clearTimeout()</code></a></li> | |
</ul> | |
<p>Schedules execution of a one-time <code>callback</code> after <code>delay</code> milliseconds.</p> | |
<p>The <code>callback</code> will likely not be invoked in precisely <code>delay</code> milliseconds. | |
@@ -40041,7 +39961,7 @@ | |
time specified.</p> | |
<p>When <code>delay</code> is larger than <code>2147483647</code> or less than <code>1</code>, the <code>delay</code> | |
will be set to <code>1</code>.</p> | |
-<p>If <code>callback</code> is not a function, a <a href="errors.html#errors_class_typeerror"><code>TypeError</code></a> will be thrown.</p> | |
+<p>If <code>callback</code> is not a function, a <a href="#errors_class_typeerror"><code>TypeError</code></a> will be thrown.</p> | |
<p>This method has a custom variant for promises that is available using | |
<a href="#util_util_promisify_original"><code>util.promisify()</code></a>:</p> | |
<pre><code class="lang-js">const util = require('util'); | |
@@ -40053,38 +39973,36 @@ | |
}); | |
</code></pre> | |
<h2>Cancelling Timers<span><a class="mark" href="#timers_cancelling_timers" id="timers_cancelling_timers">#</a></span></h2> | |
-<p>The <a href="timers.html#timers_setimmediate_callback_args"><code>setImmediate()</code></a>, <a href="timers.html#timers_setinterval_callback_delay_args"><code>setInterval()</code></a>, and <a href="timers.html#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a> methods | |
+<p>The <a href="#timers_setimmediate_callback_args"><code>setImmediate()</code></a>, <a href="#timers_setinterval_callback_delay_args"><code>setInterval()</code></a>, and <a href="#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a> methods | |
each return objects that represent the scheduled timers. These can be used to | |
cancel the timer and prevent it from triggering.</p> | |
<p>It is not possible to cancel timers that were created using the promisified | |
-variants of <a href="timers.html#timers_setimmediate_callback_args"><code>setImmediate()</code></a>, <a href="timers.html#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a>.</p> | |
+variants of <a href="#timers_setimmediate_callback_args"><code>setImmediate()</code></a>, <a href="#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a>.</p> | |
<h3>clearImmediate(immediate)<span><a class="mark" href="#timers_clearimmediate_immediate" id="timers_clearimmediate_immediate">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.9.1</span> | |
</div><ul> | |
-<li><code>immediate</code> <a href="timers.html#timers_class_immediate" class="type"><Immediate></a> An <code>Immediate</code> object as returned by | |
-<a href="timers.html#timers_setimmediate_callback_args"><code>setImmediate()</code></a>.</li> | |
+<li><code>immediate</code> <a href="#timers_class_immediate" class="type"><Immediate></a> An <code>Immediate</code> object as returned by | |
+<a href="#timers_setimmediate_callback_args"><code>setImmediate()</code></a>.</li> | |
</ul> | |
-<p>Cancels an <code>Immediate</code> object created by <a href="timers.html#timers_setimmediate_callback_args"><code>setImmediate()</code></a>.</p> | |
+<p>Cancels an <code>Immediate</code> object created by <a href="#timers_setimmediate_callback_args"><code>setImmediate()</code></a>.</p> | |
<h3>clearInterval(timeout)<span><a class="mark" href="#timers_clearinterval_timeout" id="timers_clearinterval_timeout">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.0.1</span> | |
</div><ul> | |
-<li><code>timeout</code> <a href="timers.html#timers_class_timeout" class="type"><Timeout></a> A <code>Timeout</code> object as returned by <a href="timers.html#timers_setinterval_callback_delay_args"><code>setInterval()</code></a>.</li> | |
+<li><code>timeout</code> <a href="#timers_class_timeout" class="type"><Timeout></a> A <code>Timeout</code> object as returned by <a href="#timers_setinterval_callback_delay_args"><code>setInterval()</code></a>.</li> | |
</ul> | |
-<p>Cancels a <code>Timeout</code> object created by <a href="timers.html#timers_setinterval_callback_delay_args"><code>setInterval()</code></a>.</p> | |
+<p>Cancels a <code>Timeout</code> object created by <a href="#timers_setinterval_callback_delay_args"><code>setInterval()</code></a>.</p> | |
<h3>clearTimeout(timeout)<span><a class="mark" href="#timers_cleartimeout_timeout" id="timers_cleartimeout_timeout">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.0.1</span> | |
</div><ul> | |
-<li><code>timeout</code> <a href="timers.html#timers_class_timeout" class="type"><Timeout></a> A <code>Timeout</code> object as returned by <a href="timers.html#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a>.</li> | |
+<li><code>timeout</code> <a href="#timers_class_timeout" class="type"><Timeout></a> A <code>Timeout</code> object as returned by <a href="#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a>.</li> | |
</ul> | |
-<p>Cancels a <code>Timeout</code> object created by <a href="timers.html#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a>.</p> | |
-<!-- [end-include:timers.md] --> | |
-<!-- [start-include:tls.md] --> | |
+<p>Cancels a <code>Timeout</code> object created by <a href="#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a>.</p> | |
<h1>TLS (SSL)<span><a class="mark" href="#tls_tls_ssl" id="tls_tls_ssl">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>tls</code> module provides an implementation of the Transport Layer Security | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>tls</code> module provides an implementation of the Transport Layer Security | |
(TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL. | |
The module can be accessed using:</p> | |
<pre><code class="lang-js">const tls = require('tls'); | |
@@ -40260,8 +40178,8 @@ | |
</div><p>The <code>'OCSPRequest'</code> event is emitted when the client sends a certificate status | |
request. The listener callback is passed three arguments when called:</p> | |
<ul> | |
-<li><code>certificate</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> The server certificate</li> | |
-<li><code>issuer</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> The issuer's certificate</li> | |
+<li><code>certificate</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> The server certificate</li> | |
+<li><code>issuer</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> The issuer's certificate</li> | |
<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> A callback function that must be invoked to provide | |
the results of the OCSP request.</li> | |
</ul> | |
@@ -40328,7 +40246,7 @@ | |
new connection has successfully completed. The listener callback is passed a | |
single argument when called:</p> | |
<ul> | |
-<li><code>tlsSocket</code> <a href="tls.html#tls_class_tls_tlssocket" class="type"><tls.TLSSocket></a> The established TLS socket.</li> | |
+<li><code>tlsSocket</code> <a href="#tls_class_tls_tlssocket" class="type"><tls.TLSSocket></a> The established TLS socket.</li> | |
</ul> | |
<p>The <code>tlsSocket.authorized</code> property is a <code>boolean</code> indicating whether the | |
client has been verified by one of the supplied Certificate Authorities for the | |
@@ -40348,7 +40266,7 @@ | |
called:</p> | |
<ul> | |
<li><code>exception</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a> The <code>Error</code> object describing the error</li> | |
-<li><code>tlsSocket</code> <a href="tls.html#tls_class_tls_tlssocket" class="type"><tls.TLSSocket></a> The <code>tls.TLSSocket</code> instance from which the | |
+<li><code>tlsSocket</code> <a href="#tls_class_tls_tlssocket" class="type"><tls.TLSSocket></a> The <code>tls.TLSSocket</code> instance from which the | |
error originated.</li> | |
</ul> | |
<h3>server.addContext(hostname, context)<span><a class="mark" href="#tls_server_addcontext_hostname_context" id="tls_server_addcontext_hostname_context">#</a></span></h3> | |
@@ -40369,7 +40287,7 @@ | |
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a></li> | |
</ul> | |
<p>Returns the bound address, the address family name, and port of the | |
-server as reported by the operating system. See <a href="net.html#net_server_address"><code>net.Server.address()</code></a> for | |
+server as reported by the operating system. See <a href="#net_server_address"><code>net.Server.address()</code></a> for | |
more information.</p> | |
<h3>server.close([callback])<span><a class="mark" href="#tls_server_close_callback" id="tls_server_close_callback">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -40384,7 +40302,7 @@ | |
<h3>server.connections<span><a class="mark" href="#tls_server_connections" id="tls_server_connections">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.3.2</span><span>Deprecated since: v0.9.7</span> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="net.html#net_server_getconnections_callback"><code>server.getConnections()</code></a> instead.</div><ul> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#net_server_getconnections_callback"><code>server.getConnections()</code></a> instead.</div><ul> | |
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a></li> | |
</ul> | |
<p>Returns the current number of concurrent connections on the server.</p> | |
@@ -40392,18 +40310,18 @@ | |
<div class="api_metadata"> | |
<span>Added in: v3.0.0</span> | |
</div><ul> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a></li> | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a></li> | |
</ul> | |
<p>Returns a <code>Buffer</code> instance holding the keys currently used for | |
encryption/decryption of the <a href="https://www.ietf.org/rfc/rfc5077.txt">TLS Session Tickets</a>.</p> | |
<h3>server.listen()<span><a class="mark" href="#tls_server_listen" id="tls_server_listen">#</a></span></h3> | |
<p>Starts the server listening for encrypted connections. | |
-This method is identical to <a href="net.html#net_server_listen"><code>server.listen()</code></a> from <a href="net.html#net_class_net_server"><code>net.Server</code></a>.</p> | |
+This method is identical to <a href="#net_server_listen"><code>server.listen()</code></a> from <a href="#net_class_net_server"><code>net.Server</code></a>.</p> | |
<h3>server.setTicketKeys(keys)<span><a class="mark" href="#tls_server_setticketkeys_keys" id="tls_server_setticketkeys_keys">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v3.0.0</span> | |
</div><ul> | |
-<li><code>keys</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> The keys used for encryption/decryption of the | |
+<li><code>keys</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> The keys used for encryption/decryption of the | |
<a href="https://www.ietf.org/rfc/rfc5077.txt">TLS Session Tickets</a>.</li> | |
</ul> | |
<p>Updates the keys for encryption/decryption of the <a href="https://www.ietf.org/rfc/rfc5077.txt">TLS Session Tickets</a>.</p> | |
@@ -40414,9 +40332,9 @@ | |
<h2>Class: tls.TLSSocket<span><a class="mark" href="#tls_class_tls_tlssocket" id="tls_class_tls_tlssocket">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.11.4</span> | |
-</div><p>The <code>tls.TLSSocket</code> is a subclass of <a href="net.html#net_class_net_socket"><code>net.Socket</code></a> that performs transparent | |
+</div><p>The <code>tls.TLSSocket</code> is a subclass of <a href="#net_class_net_socket"><code>net.Socket</code></a> that performs transparent | |
encryption of written data and all required TLS negotiation.</p> | |
-<p>Instances of <code>tls.TLSSocket</code> implement the duplex <a href="stream.html#stream_stream">Stream</a> interface.</p> | |
+<p>Instances of <code>tls.TLSSocket</code> implement the duplex <a href="#stream_stream">Stream</a> interface.</p> | |
<p>Methods that return TLS connection metadata (e.g. | |
<a href="#tls_tlssocket_getpeercertificate_detailed"><code>tls.TLSSocket.getPeerCertificate()</code></a> will only return data while the | |
connection is open.</p> | |
@@ -40434,15 +40352,15 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>socket</code> <a href="net.html#net_class_net_socket" class="type"><net.Socket></a> | <a href="stream.html#stream_class_stream_duplex" class="type"><stream.Duplex></a> | |
+<li><code>socket</code> <a href="#net_class_net_socket" class="type"><net.Socket></a> | <a href="#stream_class_stream_duplex" class="type"><stream.Duplex></a> | |
On the server side, any <code>Duplex</code> stream. On the client side, any | |
-instance of <a href="net.html#net_class_net_socket"><code>net.Socket</code></a> (for generic <code>Duplex</code> stream support | |
+instance of <a href="#net_class_net_socket"><code>net.Socket</code></a> (for generic <code>Duplex</code> stream support | |
on the client side, <a href="#tls_tls_connect_options_callback"><code>tls.connect()</code></a> must be used).</li> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
<li><code>isServer</code>: The SSL/TLS protocol is asymmetrical, TLSSockets must know if | |
they are to behave as a server or a client. If <code>true</code> the TLS socket will be | |
instantiated as a server. <strong>Default:</strong> <code>false</code>.</li> | |
-<li><code>server</code> <a href="net.html#net_class_net_server" class="type"><net.Server></a> An optional <a href="net.html#net_class_net_server"><code>net.Server</code></a> instance.</li> | |
+<li><code>server</code> <a href="#net_class_net_server" class="type"><net.Server></a> An optional <a href="#net_class_net_server"><code>net.Server</code></a> instance.</li> | |
<li><code>requestCert</code>: Whether to authenticate the remote peer by requesting a | |
certificate. Clients always request a server certificate. Servers | |
(<code>isServer</code> is true) may optionally set <code>requestCert</code> to true to request a | |
@@ -40450,7 +40368,7 @@ | |
<li><code>rejectUnauthorized</code>: Optional, see <a href="#tls_tls_createserver_options_secureconnectionlistener"><code>tls.createServer()</code></a></li> | |
<li><code>ALPNProtocols</code>: Optional, see <a href="#tls_tls_createserver_options_secureconnectionlistener"><code>tls.createServer()</code></a></li> | |
<li><code>SNICallback</code>: Optional, see <a href="#tls_tls_createserver_options_secureconnectionlistener"><code>tls.createServer()</code></a></li> | |
-<li><code>session</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> An optional <code>Buffer</code> instance containing a TLS session.</li> | |
+<li><code>session</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> An optional <code>Buffer</code> instance containing a TLS session.</li> | |
<li><code>requestOCSP</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> If <code>true</code>, specifies that the OCSP status request | |
extension will be added to the client hello and an <code>'OCSPResponse'</code> event | |
will be emitted on the socket before establishing a secure communication</li> | |
@@ -40471,7 +40389,7 @@ | |
when the <code>tls.TLSSocket</code> was created and an OCSP response has been received. | |
The listener callback is passed a single argument when called:</p> | |
<ul> | |
-<li><code>response</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> The server's OCSP response</li> | |
+<li><code>response</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> The server's OCSP response</li> | |
</ul> | |
<p>Typically, the <code>response</code> is a digitally signed object from the server's CA that | |
contains information about server's certificate revocation status.</p> | |
@@ -40548,7 +40466,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v9.9.0</span> | |
</div><ul> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type" class="type"><undefined></a> The latest <code>Finished</code> message that has been | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type" class="type"><undefined></a> The latest <code>Finished</code> message that has been | |
sent to the socket as part of a SSL/TLS handshake, or <code>undefined</code> if | |
no <code>Finished</code> message has been sent yet.</li> | |
</ul> | |
@@ -40601,7 +40519,7 @@ | |
<div class="api_metadata"> | |
<span>Added in: v9.9.0</span> | |
</div><ul> | |
-<li>Returns: <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type" class="type"><undefined></a> The latest <code>Finished</code> message that is expected | |
+<li>Returns: <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type" class="type"><undefined></a> The latest <code>Finished</code> message that is expected | |
or has actually been received from the socket as part of a SSL/TLS handshake, | |
or <code>undefined</code> if there is no <code>Finished</code> message so far.</li> | |
</ul> | |
@@ -40791,9 +40709,9 @@ | |
<li><code>port</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Port the client should connect to.</li> | |
<li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Creates unix socket connection to path. If this option is | |
specified, <code>host</code> and <code>port</code> are ignored.</li> | |
-<li><code>socket</code> <a href="stream.html#stream_class_stream_duplex" class="type"><stream.Duplex></a> Establish secure connection on a given socket | |
+<li><code>socket</code> <a href="#stream_class_stream_duplex" class="type"><stream.Duplex></a> Establish secure connection on a given socket | |
rather than creating a new socket. Typically, this is an instance of | |
-<a href="net.html#net_class_net_socket"><code>net.Socket</code></a>, but any <code>Duplex</code> stream is allowed. | |
+<a href="#net_class_net_socket"><code>net.Socket</code></a>, but any <code>Duplex</code> stream is allowed. | |
If this option is specified, <code>path</code>, <code>host</code> and <code>port</code> are ignored, | |
except for certificate validation. Usually, a socket is already connected | |
when passed to <code>tls.connect()</code>, but it can be connected later. Note that | |
@@ -40804,7 +40722,7 @@ | |
verified against the list of supplied CAs. An <code>'error'</code> event is emitted if | |
verification fails; <code>err.code</code> contains the OpenSSL error code. <strong>Default:</strong> | |
<code>true</code>.</li> | |
-<li><code>ALPNProtocols</code>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer[]></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array[]></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | |
+<li><code>ALPNProtocols</code>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> | <a href="#buffer_class_buffer" class="type"><Buffer[]></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array[]></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | |
An array of strings, <code>Buffer</code>s or <code>Uint8Array</code>s, or a single <code>Buffer</code> or | |
<code>Uint8Array</code> containing the supported ALPN protocols. <code>Buffer</code>s should have | |
the format <code>[len][name][len][name]...</code> e.g. <code>0x05hello0x05world</code>, where the | |
@@ -40818,7 +40736,7 @@ | |
explicitly set) against the certificate. This should return an <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type"><Error></a> if | |
verification fails. The method should return <code>undefined</code> if the <code>servername</code> | |
and <code>cert</code> are verified.</li> | |
-<li><code>session</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> A <code>Buffer</code> instance, containing TLS session.</li> | |
+<li><code>session</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> A <code>Buffer</code> instance, containing TLS session.</li> | |
<li><code>minDHSize</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Minimum size of the DH parameter in bits to accept a | |
TLS connection. When a server offers a DH parameter with a size less | |
than <code>minDHSize</code>, the TLS connection is destroyed and an error is thrown. | |
@@ -40828,7 +40746,7 @@ | |
will be created by passing the entire <code>options</code> object to | |
<code>tls.createSecureContext()</code>.</li> | |
<li><code>lookup</code>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Custom lookup function. <strong>Default:</strong> | |
-<a href="dns.html#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>.</li> | |
+<a href="#dns_dns_lookup_hostname_options_callback"><code>dns.lookup()</code></a>.</li> | |
<li>...: Optional <a href="#tls_tls_createsecurecontext_options"><code>tls.createSecureContext()</code></a> options that are used if the | |
<code>secureContext</code> option is missing, otherwise they are ignored.</li> | |
</ul> | |
@@ -40932,7 +40850,7 @@ | |
</details> | |
</div><ul> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
-<li><code>ca</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer[]></a> Optionally override the trusted CA | |
+<li><code>ca</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#buffer_class_buffer" class="type"><Buffer[]></a> Optionally override the trusted CA | |
certificates. Default is to trust the well-known CAs curated by Mozilla. | |
Mozilla's CAs are completely replaced when CAs are explicitly specified | |
using this option. The value can be a string or <code>Buffer</code>, or an <code>Array</code> of | |
@@ -40947,7 +40865,7 @@ | |
certificate can match or chain to. | |
For self-signed certificates, the certificate is its own CA, and must be | |
provided.</li> | |
-<li><code>cert</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer[]></a> Optional cert chains in PEM format. | |
+<li><code>cert</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#buffer_class_buffer" class="type"><Buffer[]></a> Optional cert chains in PEM format. | |
One cert chain should be provided per private key. Each cert chain should | |
consist of the PEM formatted certificate for a provided private <code>key</code>, | |
followed by the PEM formatted intermediate certificates (if any), in order, | |
@@ -40960,9 +40878,9 @@ | |
default. For more information, see <a href="#tls_modifying_the_default_tls_cipher_suite">modifying the default cipher suite</a>.</li> | |
<li><code>clientCertEngine</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Optional name of an OpenSSL engine which can | |
provide the client certificate.</li> | |
-<li><code>crl</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer[]></a> Optional PEM formatted | |
+<li><code>crl</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#buffer_class_buffer" class="type"><Buffer[]></a> Optional PEM formatted | |
CRLs (Certificate Revocation Lists).</li> | |
-<li><code>dhparam</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> Diffie Hellman parameters, required for | |
+<li><code>dhparam</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> Diffie Hellman parameters, required for | |
<a href="#tls_perfect_forward_secrecy">Perfect Forward Secrecy</a>. Use <code>openssl dhparam</code> to create the parameters. | |
The key length must be greater than or equal to 1024 bits, otherwise an | |
error will be thrown. It is strongly recommended to use 2048 bits or larger | |
@@ -40971,15 +40889,15 @@ | |
<li><code>ecdhCurve</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> A string describing a named curve or a colon separated | |
list of curve NIDs or names, for example <code>P-521:P-384:P-256</code>, to use for | |
ECDH key agreement, or <code>false</code> to disable ECDH. Set to <code>auto</code> to select the | |
-curve automatically. Use <a href="crypto.html#crypto_crypto_getcurves"><code>crypto.getCurves()</code></a> to obtain a list of | |
+curve automatically. Use <a href="#crypto_crypto_getcurves"><code>crypto.getCurves()</code></a> to obtain a list of | |
available curve names. On recent releases, <code>openssl ecparam -list_curves</code> | |
will also display the name and description of each available elliptic curve. | |
<strong>Default:</strong> <a href="#tls_tls_default_ecdh_curve"><code>tls.DEFAULT_ECDH_CURVE</code></a>.</li> | |
<li><code>honorCipherOrder</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> Attempt to use the server's cipher suite | |
preferences instead of the client's. When <code>true</code>, causes | |
<code>SSL_OP_CIPHER_SERVER_PREFERENCE</code> to be set in <code>secureOptions</code>, see | |
-<a href="crypto.html#crypto_openssl_options">OpenSSL Options</a> for more information.</li> | |
-<li><code>key</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer[]></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object[]></a> Optional private keys in | |
+<a href="#crypto_openssl_options">OpenSSL Options</a> for more information.</li> | |
+<li><code>key</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#buffer_class_buffer" class="type"><Buffer[]></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object[]></a> Optional private keys in | |
PEM format. PEM allows the option of private keys being encrypted. Encrypted | |
keys will be decrypted with <code>options.passphrase</code>. Multiple keys using | |
different algorithms can be provided either as an array of unencrypted key | |
@@ -40989,7 +40907,7 @@ | |
with <code>object.passphrase</code> if provided, or <code>options.passphrase</code> if it is not.</li> | |
<li><code>passphrase</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Optional shared passphrase used for a single private | |
key and/or a PFX.</li> | |
-<li><code>pfx</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer[]></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object[]></a> Optional PFX or PKCS12 | |
+<li><code>pfx</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="#buffer_class_buffer" class="type"><Buffer[]></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object[]></a> Optional PFX or PKCS12 | |
encoded private key and certificate chain. <code>pfx</code> is an alternative to | |
providing <code>key</code> and <code>cert</code> individually. PFX is usually encrypted, if it is, | |
<code>passphrase</code> will be used to decrypt it. Multiple PFX can be provided either | |
@@ -41001,7 +40919,7 @@ | |
<li><code>secureOptions</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> Optionally affect the OpenSSL protocol behavior, | |
which is not usually necessary. This should be used carefully if at all! | |
Value is a numeric bitmask of the <code>SSL_OP_*</code> options from | |
-<a href="crypto.html#crypto_openssl_options">OpenSSL Options</a>.</li> | |
+<a href="#crypto_openssl_options">OpenSSL Options</a>.</li> | |
<li><code>secureProtocol</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Optional SSL method to use. The possible values | |
are listed as <a href="https://www.openssl.org/docs/man1.1.0/ssl/ssl.html#Dealing-with-Protocol-Methods">SSL_METHODS</a>, use the function names as strings. | |
For example, <code>'TLSv1_2_method'</code> to force TLS version 1.2. <strong>Default:</strong> | |
@@ -41043,7 +40961,7 @@ | |
</details> | |
</div><ul> | |
<li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a><ul> | |
-<li><code>ALPNProtocols</code>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer[]></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array[]></a> | <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | |
+<li><code>ALPNProtocols</code>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string[]></a> | <a href="#buffer_class_buffer" class="type"><Buffer[]></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array[]></a> | <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | |
An array of strings, <code>Buffer</code>s or <code>Uint8Array</code>s, or a single <code>Buffer</code> or | |
<code>Uint8Array</code> containing the supported ALPN protocols. <code>Buffer</code>s should have | |
the format <code>[len][name][len][name]...</code> e.g. <code>0x05hello0x05world</code>, where the | |
@@ -41155,7 +41073,7 @@ | |
<h3>Class: CryptoStream<span><a class="mark" href="#tls_class_cryptostream" id="tls_class_cryptostream">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.3.4</span><span>Deprecated since: v0.11.3</span> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#tls_class_tls_tlssocket"><code>tls.TLSSocket</code></a> instead.</div><p>The <code>tls.CryptoStream</code> class represents a stream of encrypted data. This class | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#tls_class_tls_tlssocket"><code>tls.TLSSocket</code></a> instead.</div><p>The <code>tls.CryptoStream</code> class represents a stream of encrypted data. This class | |
is deprecated and should no longer be used.</p> | |
<h4>cryptoStream.bytesWritten<span><a class="mark" href="#tls_cryptostream_byteswritten" id="tls_cryptostream_byteswritten">#</a></span></h4> | |
<div class="api_metadata"> | |
@@ -41166,7 +41084,7 @@ | |
<h3>Class: SecurePair<span><a class="mark" href="#tls_class_securepair" id="tls_class_securepair">#</a></span></h3> | |
<div class="api_metadata"> | |
<span>Added in: v0.3.2</span><span>Deprecated since: v0.11.3</span> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#tls_class_tls_tlssocket"><code>tls.TLSSocket</code></a> instead.</div><p>Returned by <a href="#tls_tls_createsecurepair_context_isserver_requestcert_rejectunauthorized_options"><code>tls.createSecurePair()</code></a>.</p> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#tls_class_tls_tlssocket"><code>tls.TLSSocket</code></a> instead.</div><p>Returned by <a href="#tls_tls_createsecurepair_context_isserver_requestcert_rejectunauthorized_options"><code>tls.createSecurePair()</code></a>.</p> | |
<h4>Event: 'secure'<span><a class="mark" href="#tls_event_secure" id="tls_event_secure">#</a></span></h4> | |
<div class="api_metadata"> | |
<span>Added in: v0.3.2</span><span>Deprecated since: v0.11.3</span> | |
@@ -41192,7 +41110,7 @@ | |
</td></tr> | |
</table> | |
</details> | |
-</div><div class="api_stability api_stability_0"><a href="documentation.html#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#tls_class_tls_tlssocket"><code>tls.TLSSocket</code></a> instead.</div><ul> | |
+</div><div class="api_stability api_stability_0"><a href="#documentation_stability_index">Stability: 0</a> - Deprecated: Use <a href="#tls_class_tls_tlssocket"><code>tls.TLSSocket</code></a> instead.</div><ul> | |
<li><code>context</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> A secure context object as returned by | |
<code>tls.createSecureContext()</code></li> | |
<li><code>isServer</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> <code>true</code> to specify that this TLS connection should be | |
@@ -41206,12 +41124,12 @@ | |
<a href="#tls_tls_createsecurecontext_options"><code>tls.createSecureContext()</code></a></li> | |
<li><code>isServer</code>: If <code>true</code> the TLS socket will be instantiated in server-mode. | |
<strong>Default:</strong> <code>false</code>.</li> | |
-<li><code>server</code> <a href="net.html#net_class_net_server" class="type"><net.Server></a> An optional <a href="net.html#net_class_net_server"><code>net.Server</code></a> instance</li> | |
+<li><code>server</code> <a href="#net_class_net_server" class="type"><net.Server></a> An optional <a href="#net_class_net_server"><code>net.Server</code></a> instance</li> | |
<li><code>requestCert</code>: Optional, see <a href="#tls_tls_createserver_options_secureconnectionlistener"><code>tls.createServer()</code></a></li> | |
<li><code>rejectUnauthorized</code>: Optional, see <a href="#tls_tls_createserver_options_secureconnectionlistener"><code>tls.createServer()</code></a></li> | |
<li><code>ALPNProtocols</code>: Optional, see <a href="#tls_tls_createserver_options_secureconnectionlistener"><code>tls.createServer()</code></a></li> | |
<li><code>SNICallback</code>: Optional, see <a href="#tls_tls_createserver_options_secureconnectionlistener"><code>tls.createServer()</code></a></li> | |
-<li><code>session</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> An optional <code>Buffer</code> instance containing a TLS session.</li> | |
+<li><code>session</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> An optional <code>Buffer</code> instance containing a TLS session.</li> | |
<li><code>requestOCSP</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> If <code>true</code>, specifies that the OCSP status request | |
extension will be added to the client hello and an <code>'OCSPResponse'</code> event | |
will be emitted on the socket before establishing a secure communication.</li> | |
@@ -41236,11 +41154,9 @@ | |
<pre><code class="lang-js">secureSocket = tls.TLSSocket(socket, options); | |
</code></pre> | |
<p>where <code>secureSocket</code> has the same API as <code>pair.cleartext</code>.</p> | |
-<!-- [end-include:tls.md] --> | |
-<!-- [start-include:tracing.md] --> | |
<h1>Trace Events<span><a class="mark" href="#tracing_trace_events" id="tracing_trace_events">#</a></span></h1> | |
<!--introduced_in=v7.7.0--> | |
-<div class="api_stability api_stability_1"><a href="documentation.html#documentation_stability_index">Stability: 1</a> - Experimental</div><p>Trace Event provides a mechanism to centralize tracing information generated by | |
+<div class="api_stability api_stability_1"><a href="#documentation_stability_index">Stability: 1</a> - Experimental</div><p>Trace Event provides a mechanism to centralize tracing information generated by | |
V8, Node.js core, and userspace code.</p> | |
<p>Tracing can be enabled with the <code>--trace-event-categories</code> command-line flag | |
or by using the <code>trace_events</code> module. The <code>--trace-event-categories</code> flag | |
@@ -41262,7 +41178,7 @@ | |
<li><code>node.fs.sync</code> - Enables capture of trace data for file system sync methods.</li> | |
<li><code>node.vm.script</code> - Enables capture of trace data for the <code>vm</code> module's | |
<code>runInNewContext()</code>, <code>runInContext()</code>, and <code>runInThisContext()</code> methods.</li> | |
-<li><code>v8</code> - The <a href="https://developers.google.com/v8/">V8</a> events are GC, compiling, and execution related.</li> | |
+<li><code>v8</code> - The <a href="v8.html">V8</a> events are GC, compiling, and execution related.</li> | |
</ul> | |
<p>By default the <code>node</code>, <code>node.async_hooks</code>, and <code>v8</code> categories are enabled.</p> | |
<pre><code class="lang-txt">node --trace-event-categories v8,node,node.async_hooks server.js | |
@@ -41361,7 +41277,7 @@ | |
thrown if the value cannot be coerced.</li> | |
</ul> | |
</li> | |
-<li>Returns: <a href="tracing.html#tracing_tracing_object" class="type"><Tracing></a>.</li> | |
+<li>Returns: <a href="#tracing_tracing_object" class="type"><Tracing></a>.</li> | |
</ul> | |
<p>Creates and returns a <code>Tracing</code> object for the given set of <code>categories</code>.</p> | |
<pre><code class="lang-js">const trace_events = require('trace_events'); | |
@@ -41394,18 +41310,16 @@ | |
console.log(trace_events.getEnabledCategories()); | |
</code></pre> | |
-<!-- [end-include:tracing.md] --> | |
-<!-- [start-include:tty.md] --> | |
<h1>TTY<span><a class="mark" href="#tty_tty" id="tty_tty">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>tty</code> module provides the <code>tty.ReadStream</code> and <code>tty.WriteStream</code> classes. | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><p>The <code>tty</code> module provides the <code>tty.ReadStream</code> and <code>tty.WriteStream</code> classes. | |
In most cases, it will not be necessary or possible to use this module directly. | |
However, it can be accessed using:</p> | |
<pre><code class="lang-js">const tty = require('tty'); | |
</code></pre> | |
<p>When Node.js detects that it is being run with a text terminal ("TTY") | |
-attached, <a href="process.html#process_process_stdin"><code>process.stdin</code></a> will, by default, be initialized as an instance of | |
-<code>tty.ReadStream</code> and both <a href="process.html#process_process_stdout"><code>process.stdout</code></a> and <a href="process.html#process_process_stderr"><code>process.stderr</code></a> will, by | |
+attached, <a href="#process_process_stdin"><code>process.stdin</code></a> will, by default, be initialized as an instance of | |
+<code>tty.ReadStream</code> and both <a href="#process_process_stdout"><code>process.stdout</code></a> and <a href="#process_process_stderr"><code>process.stderr</code></a> will, by | |
default be instances of <code>tty.WriteStream</code>. The preferred method of determining | |
whether Node.js is being run within a TTY context is to check that the value of | |
the <code>process.stdout.isTTY</code> property is <code>true</code>:</p> | |
@@ -41420,8 +41334,8 @@ | |
<h2>Class: tty.ReadStream<span><a class="mark" href="#tty_class_tty_readstream" id="tty_class_tty_readstream">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.5.8</span> | |
-</div><p>The <code>tty.ReadStream</code> class is a subclass of <a href="net.html#net_class_net_socket"><code>net.Socket</code></a> that represents the | |
-readable side of a TTY. In normal circumstances <a href="process.html#process_process_stdin"><code>process.stdin</code></a> will be the | |
+</div><p>The <code>tty.ReadStream</code> class is a subclass of <a href="#net_class_net_socket"><code>net.Socket</code></a> that represents the | |
+readable side of a TTY. In normal circumstances <a href="#process_process_stdin"><code>process.stdin</code></a> will be the | |
only <code>tty.ReadStream</code> instance in a Node.js process and there should be no | |
reason to create additional instances.</p> | |
<h3>readStream.isRaw<span><a class="mark" href="#tty_readstream_israw" id="tty_readstream_israw">#</a></span></h3> | |
@@ -41450,9 +41364,9 @@ | |
<h2>Class: tty.WriteStream<span><a class="mark" href="#tty_class_tty_writestream" id="tty_class_tty_writestream">#</a></span></h2> | |
<div class="api_metadata"> | |
<span>Added in: v0.5.8</span> | |
-</div><p>The <code>tty.WriteStream</code> class is a subclass of <a href="net.html#net_class_net_socket"><code>net.Socket</code></a> that represents | |
-the writable side of a TTY. In normal circumstances, <a href="process.html#process_process_stdout"><code>process.stdout</code></a> and | |
-<a href="process.html#process_process_stderr"><code>process.stderr</code></a> will be the only <code>tty.WriteStream</code> instances created for a | |
+</div><p>The <code>tty.WriteStream</code> class is a subclass of <a href="#net_class_net_socket"><code>net.Socket</code></a> that represents | |
+the writable side of a TTY. In normal circumstances, <a href="#process_process_stdout"><code>process.stdout</code></a> and | |
+<a href="#process_process_stderr"><code>process.stderr</code></a> will be the only <code>tty.WriteStream</code> instances created for a | |
Node.js process and there should be no reason to create additional instances.</p> | |
<h3>Event: 'resize'<span><a class="mark" href="#tty_event_resize" id="tty_event_resize">#</a></span></h3> | |
<div class="api_metadata"> | |
@@ -41512,11 +41426,9 @@ | |
<p>The <code>tty.isatty()</code> method returns <code>true</code> if the given <code>fd</code> is associated with | |
a TTY and <code>false</code> if it is not, including whenever <code>fd</code> is not a non-negative | |
integer.</p> | |
-<!-- [end-include:tty.md] --> | |
-<!-- [start-include:dgram.md] --> | |
<h1>UDP/Datagram Sockets<span><a class="mark" href="#dgram_udp_datagram_sockets" id="dgram_udp_datagram_sockets">#</a></span></h1> | |
<!--introduced_in=v0.10.0--> | |
-<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - Stable</div><!-- name=dgram --> | |
+<div class="api_stability api_stability_2"><a href="#documentation_stability_index">Stability: 2</a> - Stable</div><!-- name=dgram --> | |
<p>The <code>dgram</code> module provides an implementation of UDP Datagram sockets.</p> | |
<pre><code class="lang-js">const dgram = require('dgram'); | |
const server = dgram.createSocket('udp4'); | |
@@ -41569,7 +41481,7 @@ | |
</div><p>The <code>'message'</code> event is emitted when a new datagram is available on a socket. | |
The event handler function is passed two arguments: <code>msg</code> and <code>rinfo</code>.</p> | |
<ul> | |
-<li><code>msg</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> The message.</li> | |
+<li><code>msg</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> The message.</li> | |
<li><code>rinfo</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type"><Object></a> Remote address information.<ul> | |
<li><code>address</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The sender address.</li> | |
<li><code>family</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The address family (<code>'IPv4'</code> or <code>'IPv6'</code>).</li> | |
@@ -41620,7 +41532,7 @@ | |
<p>A bound datagram socket keeps the Node.js process running to receive | |
datagram messages.</p> | |
<p>If binding fails, an <code>'error'</code> event is generated. In rare case (e.g. | |
-attempting to bind with a closed socket), an <a href="errors.html#errors_class_error"><code>Error</code></a> may be thrown.</p> | |
+attempting to bind with a closed socket), an <a href="#errors_class_error"><code>Error</code></a> may be thrown.</p> | |
<p>Example of a UDP server listening on port 41234:</p> | |
<pre><code class="lang-js">const dgram = require('dgram'); | |
const server = dgram.createSocket('udp4'); | |
@@ -41674,7 +41586,7 @@ | |
<p>A bound datagram socket keeps the Node.js process running to receive | |
datagram messages.</p> | |
<p>If binding fails, an <code>'error'</code> event is generated. In rare case (e.g. | |
-attempting to bind with a closed socket), an <a href="errors.html#errors_class_error"><code>Error</code></a> may be thrown.</p> | |
+attempting to bind with a closed socket), an <a href="#errors_class_error"><code>Error</code></a> may be thrown.</p> | |
<p>An example socket listening on an exclusive port is shown below.</p> | |
<pre><code class="lang-js">socket.bind({ | |
address: 'localhost', | |
@@ -41746,7 +41658,7 @@ | |
</table> | |
</details> | |
</div><ul> | |
-<li><code>msg</code> <a href="buffer.html#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="type"><Array></a> Message to be sent.</li> | |
+<li><code>msg</code> <a href="#buffer_class_buffer" class="type"><Buffer></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" class="type"><Uint8Array></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="type"><Array></a> Message to be sent.</li> | |
<li><code>offset</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> Offset in the buffer where the message starts.</li> | |
<li><code>length</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> Number of bytes in the message.</li> | |
<li><code>port</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> Destination port.</li> | |
@@ -41763,7 +41675,7 @@ | |
If <code>msg</code> is a <code>String</code>, then it is automatically converted to a <code>Buffer</code> | |
with <code>'utf8'</code> encoding. With messages that | |
contain multi-byte characters, <code>offset</code> and <code>length</code> will be calculated with | |
-respect to <a href="buffer.html#buffer_class_method_buffer_bytelength_string_encoding">byte length</a> and not the character position. | |
+respect to <a href="#buffer_class_method_buffer_bytelength_string_encoding">byte length</a> and not the character position. | |
If <code>msg</code> is an array, <code>offset</code> and <code>length</code> must not be specified.</p> | |
<p>The <code>address</code> argument is a string. If the value of <code>address</code> is a host name, | |
DNS will be used to resolve the address of the host. If <code>address</code> is not | |
@@ -41883,12 +41795,12 @@ | |
</code></pre> | |
<h4>Call Results<span><a class="mark" href="#dgram_call_results" id="dgram_call_results">#</a></span></h4> | |
<p>A call on a socket that is not ready to send or no longer open may throw a <em>Not | |
-running</em> <a href="errors.html#errors_class_error"><code>Error</code></a>.</p> | |
+running</em> <a href="#errors_class_error"><code>Error</code></a>.</p> | |
<p>If <code>multicastInterface</code> can not be parsed into an IP then an <em>EINVAL</em> | |
-<a href="errors.html#errors_class_systemerror"><code>System Error</code></a> is thrown.</p> | |
+<a href="#errors_class_systemerror"><code>System Error</code></a> is thrown.</p> | |
<p>On IPv4, if <code>multicastInterface</code> is a valid address but does not match any | |
interface, or if the address does not match the family then | |
-a <a href="errors.html#errors_class_systemerror"><code>System Error</code></a> such as <code>EADDRNOTAVAIL</code> or <code>EPROTONOSUP</code> is thrown.</p> | |
+a <a href="#errors_class_systemerror"><code>System Error</code></a> such as <code>EADDRNOTAVAIL</code> or <code>EPROTONOSUP</code> is thrown.</p> | |
<p>On IPv6, most errors with specifying or omitting scope will result in the socket | |
continuing to use (or returning to) the system's default interface selection.</p> | |
<p>A socket's address family's ANY address (IPv4 <code>'0.0.0.0'</code> or IPv6 <code>'::'</code>) can be | |
@@ -41996,11 +41908,11 @@ | |
<strong>Default:</strong> <code>false</code>.</li> | |
<li><code>recvBufferSize</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> - Sets the <code>SO_RCVBUF</code> socket value.</li> | |
<li><code>sendBufferSize</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> - Sets the <code>SO_SNDBUF</code> socket value.</li> | |
-<li><code>lookup</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type"><Function></a> Custom lookup function. <strong>Default:</strong> <a href="dns.htm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment