Skip to content

Commit 0f9d474

Browse files
committed
doc: standardize constructor doc header layout
Our docs use a mixture of _Constructor: `new Fhqwhgads()`_ in some headers and only _`new Fhqwhgads()`_ in other headers. The latter is about three times as common, so let's standardize on that. PR-URL: #33781 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent 362e4a1 commit 0f9d474

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

doc/api/crypto.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3520,7 +3520,7 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.
35203520
[`keyObject.export()`]: #crypto_keyobject_export_options
35213521
[`sign.sign()`]: #crypto_sign_sign_privatekey_outputencoding
35223522
[`sign.update()`]: #crypto_sign_update_data_inputencoding
3523-
[`stream.Writable` options]: stream.html#stream_constructor_new_stream_writable_options
3523+
[`stream.Writable` options]: stream.html#stream_new_stream_writable_options
35243524
[`stream.transform` options]: stream.html#stream_new_stream_transform_options
35253525
[`util.promisify()`]: util.html#util_util_promisify_original
35263526
[`verify.update()`]: #crypto_verify_update_data_inputencoding

doc/api/errors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2587,8 +2587,8 @@ such as `process.stdout.on('data')`.
25872587
[`https`]: https.html
25882588
[`libuv Error handling`]: http://docs.libuv.org/en/v1.x/errors.html
25892589
[`net`]: net.html
2590-
[`new URL(input)`]: url.html#url_constructor_new_url_input_base
2591-
[`new URLSearchParams(iterable)`]: url.html#url_constructor_new_urlsearchparams_iterable
2590+
[`new URL(input)`]: url.html#url_new_url_input_base
2591+
[`new URLSearchParams(iterable)`]: url.html#url_new_urlsearchparams_iterable
25922592
[`process.on('exit')`]: process.html#Event:-`'exit'`
25932593
[`process.send()`]: process.html#process_process_send_message_sendhandle_options_callback
25942594
[`process.setUncaughtExceptionCaptureCallback()`]: process.html#process_process_setuncaughtexceptioncapturecallback_fn

doc/api/http.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2616,7 +2616,7 @@ try {
26162616
[`net.Server`]: net.html#net_class_net_server
26172617
[`net.Socket`]: net.html#net_class_net_socket
26182618
[`net.createConnection()`]: net.html#net_net_createconnection_options_connectlistener
2619-
[`new URL()`]: url.html#url_constructor_new_url_input_base
2619+
[`new URL()`]: url.html#url_new_url_input_base
26202620
[`removeHeader(name)`]: #http_request_removeheader_name
26212621
[`request.end()`]: #http_request_end_data_encoding_callback
26222622
[`request.destroy()`]: #http_request_destroy_error

doc/api/https.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; p
459459
[`https.Agent`]: #https_class_https_agent
460460
[`https.request()`]: #https_https_request_options_callback
461461
[`net.Server`]: net.html#net_class_net_server
462-
[`new URL()`]: url.html#url_constructor_new_url_input_base
462+
[`new URL()`]: url.html#url_new_url_input_base
463463
[`server.listen()`]: net.html#net_server_listen
464464
[`tls.connect()`]: tls.html#tls_tls_connect_options_callback
465465
[`tls.createSecureContext()`]: tls.html#tls_tls_createsecurecontext_options

doc/api/inspector.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ An exception will be thrown if there is no active inspector.
8484
The `inspector.Session` is used for dispatching messages to the V8 inspector
8585
back-end and receiving message responses and notifications.
8686

87-
### Constructor: `new inspector.Session()`
87+
### `new inspector.Session()`
8888
<!-- YAML
8989
added: v8.0.0
9090
-->

doc/api/stream.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,7 +1819,7 @@ Custom `Writable` streams *must* call the `new stream.Writable([options])`
18191819
constructor and implement the `writable._write()` and/or `writable._writev()`
18201820
method.
18211821

1822-
#### Constructor: `new stream.Writable([options])`
1822+
#### `new stream.Writable([options])`
18231823
<!-- YAML
18241824
changes:
18251825
- version: v14.0.0
@@ -3135,5 +3135,5 @@ contain multi-byte characters.
31353135
[writable-_construct]: #stream_writable_construct_callback
31363136
[writable-_destroy]: #stream_writable_destroy_err_callback
31373137
[writable-destroy]: #stream_writable_destroy_error
3138-
[writable-new]: #stream_constructor_new_stream_writable_options
3138+
[writable-new]: #stream_new_stream_writable_options
31393139
[zlib]: zlib.html

doc/api/url.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ using the `delete` keyword on any properties of `URL` objects (e.g. `delete
8989
myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still
9090
return `true`.
9191

92-
#### Constructor: `new URL(input[, base])`
92+
#### `new URL(input[, base])`
9393

9494
* `input` {string} The absolute or relative input URL to parse. If `input`
9595
is relative, then `base` is required. If `input` is absolute, the `base`
@@ -618,11 +618,11 @@ console.log(myURL.href);
618618
// Prints https://example.org/?a=b&a=c
619619
```
620620

621-
#### Constructor: `new URLSearchParams()`
621+
#### `new URLSearchParams()`
622622

623623
Instantiate a new empty `URLSearchParams` object.
624624

625-
#### Constructor: `new URLSearchParams(string)`
625+
#### `new URLSearchParams(string)`
626626

627627
* `string` {string} A query string
628628

@@ -643,7 +643,7 @@ console.log(params.toString());
643643
// Prints 'user=abc&query=xyz'
644644
```
645645

646-
#### Constructor: `new URLSearchParams(obj)`
646+
#### `new URLSearchParams(obj)`
647647
<!-- YAML
648648
added:
649649
- v7.10.0
@@ -670,7 +670,7 @@ console.log(params.toString());
670670
// Prints 'user=abc&query=first%2Csecond'
671671
```
672672

673-
#### Constructor: `new URLSearchParams(iterable)`
673+
#### `new URLSearchParams(iterable)`
674674
<!-- YAML
675675
added:
676676
- v7.10.0
@@ -1359,7 +1359,7 @@ console.log(myURL.origin);
13591359
[`TypeError`]: errors.html#errors_class_typeerror
13601360
[`URLSearchParams`]: #url_class_urlsearchparams
13611361
[`array.toString()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString
1362-
[`new URL()`]: #url_constructor_new_url_input_base
1362+
[`new URL()`]: #url_new_url_input_base
13631363
[`querystring`]: querystring.html
13641364
[`require('url').format()`]: #url_url_format_url_options
13651365
[`url.domainToASCII()`]: #url_url_domaintoascii_domain

doc/api/v8.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ A subclass of [`Deserializer`][] corresponding to the format written by
516516
[`serializer.releaseBuffer()`]: #v8_serializer_releasebuffer
517517
[`serializer.transferArrayBuffer()`]: #v8_serializer_transferarraybuffer_id_arraybuffer
518518
[`serializer.writeRawBytes()`]: #v8_serializer_writerawbytes_buffer
519-
[`vm.Script`]: vm.html#vm_constructor_new_vm_script_code_options
519+
[`vm.Script`]: vm.html#vm_new_vm_script_code_options
520520
[HTML structured clone algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
521521
[V8]: https://developers.google.com/v8/
522522
[Worker Threads]: worker_threads.html

doc/api/vm.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ added: v0.3.1
4848
Instances of the `vm.Script` class contain precompiled scripts that can be
4949
executed in specific contexts.
5050

51-
### Constructor: `new vm.Script(code[, options])`
51+
### `new vm.Script(code[, options])`
5252
<!-- YAML
5353
added: v0.3.1
5454
changes:
@@ -628,7 +628,7 @@ flag enabled.*
628628
The `vm.SourceTextModule` class provides the [Source Text Module Record][] as
629629
defined in the ECMAScript specification.
630630

631-
### Constructor: `new vm.SourceTextModule(code[, options])`
631+
### `new vm.SourceTextModule(code[, options])`
632632

633633
* `code` {string} JavaScript Module code to parse
634634
* `options`
@@ -749,7 +749,7 @@ const module = new vm.SyntheticModule(['default'], function() {
749749
// Use `module` in linking...
750750
```
751751

752-
### Constructor: `new vm.SyntheticModule(exportNames, evaluateCallback[, options])`
752+
### `new vm.SyntheticModule(exportNames, evaluateCallback[, options])`
753753
<!-- YAML
754754
added:
755755
- v13.0.0

0 commit comments

Comments
 (0)