Skip to content

Commit 114d77e

Browse files
Trottcodebytere
authored andcommitted
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 524daf8 commit 114d77e

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

doc/api/crypto.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3512,7 +3512,7 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.
35123512
[`keyObject.export()`]: #crypto_keyobject_export_options
35133513
[`sign.sign()`]: #crypto_sign_sign_privatekey_outputencoding
35143514
[`sign.update()`]: #crypto_sign_update_data_inputencoding
3515-
[`stream.Writable` options]: stream.html#stream_constructor_new_stream_writable_options
3515+
[`stream.Writable` options]: stream.html#stream_new_stream_writable_options
35163516
[`stream.transform` options]: stream.html#stream_new_stream_transform_options
35173517
[`util.promisify()`]: util.html#util_util_promisify_original
35183518
[`verify.update()`]: #crypto_verify_update_data_inputencoding

doc/api/errors.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2580,8 +2580,8 @@ such as `process.stdout.on('data')`.
25802580
[`https`]: https.html
25812581
[`libuv Error handling`]: http://docs.libuv.org/en/v1.x/errors.html
25822582
[`net`]: net.html
2583-
[`new URL(input)`]: url.html#url_constructor_new_url_input_base
2584-
[`new URLSearchParams(iterable)`]: url.html#url_constructor_new_urlsearchparams_iterable
2583+
[`new URL(input)`]: url.html#url_new_url_input_base
2584+
[`new URLSearchParams(iterable)`]: url.html#url_new_urlsearchparams_iterable
25852585
[`process.on('exit')`]: process.html#Event:-`'exit'`
25862586
[`process.send()`]: process.html#process_process_send_message_sendhandle_options_callback
25872587
[`process.setUncaughtExceptionCaptureCallback()`]: process.html#process_process_setuncaughtexceptioncapturecallback_fn

doc/api/http.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2596,7 +2596,7 @@ try {
25962596
[`net.Server`]: net.html#net_class_net_server
25972597
[`net.Socket`]: net.html#net_class_net_socket
25982598
[`net.createConnection()`]: net.html#net_net_createconnection_options_connectlistener
2599-
[`new URL()`]: url.html#url_constructor_new_url_input_base
2599+
[`new URL()`]: url.html#url_new_url_input_base
26002600
[`removeHeader(name)`]: #http_request_removeheader_name
26012601
[`request.end()`]: #http_request_end_data_encoding_callback
26022602
[`request.destroy()`]: #http_request_destroy_error

doc/api/https.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; p
457457
[`https.Agent`]: #https_class_https_agent
458458
[`https.request()`]: #https_https_request_options_callback
459459
[`net.Server`]: net.html#net_class_net_server
460-
[`new URL()`]: url.html#url_constructor_new_url_input_base
460+
[`new URL()`]: url.html#url_new_url_input_base
461461
[`server.listen()`]: net.html#net_server_listen
462462
[`tls.connect()`]: tls.html#tls_tls_connect_options_callback
463463
[`tls.createSecureContext()`]: tls.html#tls_tls_createsecurecontext_options

doc/api/inspector.md

+1-1
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1815,7 +1815,7 @@ Custom `Writable` streams *must* call the `new stream.Writable([options])`
18151815
constructor and implement the `writable._write()` and/or `writable._writev()`
18161816
method.
18171817

1818-
#### Constructor: `new stream.Writable([options])`
1818+
#### `new stream.Writable([options])`
18191819
<!-- YAML
18201820
changes:
18211821
- version: v14.0.0
@@ -2978,5 +2978,5 @@ contain multi-byte characters.
29782978
[Stream Three States]: #stream_three_states
29792979
[writable-_destroy]: #stream_writable_destroy_err_callback
29802980
[writable-destroy]: #stream_writable_destroy_error
2981-
[writable-new]: #stream_constructor_new_stream_writable_options
2981+
[writable-new]: #stream_new_stream_writable_options
29822982
[zlib]: zlib.html

doc/api/url.md

+6-6
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`
@@ -600,11 +600,11 @@ console.log(myURL.href);
600600
// Prints https://example.org/?a=b&a=c
601601
```
602602

603-
#### Constructor: `new URLSearchParams()`
603+
#### `new URLSearchParams()`
604604

605605
Instantiate a new empty `URLSearchParams` object.
606606

607-
#### Constructor: `new URLSearchParams(string)`
607+
#### `new URLSearchParams(string)`
608608

609609
* `string` {string} A query string
610610

@@ -625,7 +625,7 @@ console.log(params.toString());
625625
// Prints 'user=abc&query=xyz'
626626
```
627627

628-
#### Constructor: `new URLSearchParams(obj)`
628+
#### `new URLSearchParams(obj)`
629629
<!-- YAML
630630
added:
631631
- v7.10.0
@@ -652,7 +652,7 @@ console.log(params.toString());
652652
// Prints 'user=abc&query=first%2Csecond'
653653
```
654654

655-
#### Constructor: `new URLSearchParams(iterable)`
655+
#### `new URLSearchParams(iterable)`
656656
<!-- YAML
657657
added:
658658
- v7.10.0
@@ -1341,7 +1341,7 @@ console.log(myURL.origin);
13411341
[`TypeError`]: errors.html#errors_class_typeerror
13421342
[`URLSearchParams`]: #url_class_urlsearchparams
13431343
[`array.toString()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString
1344-
[`new URL()`]: #url_constructor_new_url_input_base
1344+
[`new URL()`]: #url_new_url_input_base
13451345
[`querystring`]: querystring.html
13461346
[`require('url').format()`]: #url_url_format_url_options
13471347
[`url.domainToASCII()`]: #url_url_domaintoascii_domain

doc/api/v8.md

+1-1
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

+3-3
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`
@@ -747,7 +747,7 @@ const module = new vm.SyntheticModule(['default'], function() {
747747
// Use `module` in linking...
748748
```
749749

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

0 commit comments

Comments
 (0)