Skip to content

Commit e4854de

Browse files
Trottaddaleax
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 830574f commit e4854de

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
@@ -3496,7 +3496,7 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.
34963496
[`keyObject.export()`]: #crypto_keyobject_export_options
34973497
[`sign.sign()`]: #crypto_sign_sign_privatekey_outputencoding
34983498
[`sign.update()`]: #crypto_sign_update_data_inputencoding
3499-
[`stream.Writable` options]: stream.html#stream_constructor_new_stream_writable_options
3499+
[`stream.Writable` options]: stream.html#stream_new_stream_writable_options
35003500
[`stream.transform` options]: stream.html#stream_new_stream_transform_options
35013501
[`util.promisify()`]: util.html#util_util_promisify_original
35023502
[`verify.update()`]: #crypto_verify_update_data_inputencoding

doc/api/errors.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2556,8 +2556,8 @@ such as `process.stdout.on('data')`.
25562556
[`https`]: https.html
25572557
[`libuv Error handling`]: http://docs.libuv.org/en/v1.x/errors.html
25582558
[`net`]: net.html
2559-
[`new URL(input)`]: url.html#url_constructor_new_url_input_base
2560-
[`new URLSearchParams(iterable)`]: url.html#url_constructor_new_urlsearchparams_iterable
2559+
[`new URL(input)`]: url.html#url_new_url_input_base
2560+
[`new URLSearchParams(iterable)`]: url.html#url_new_urlsearchparams_iterable
25612561
[`process.on('exit')`]: process.html#Event:-`'exit'`
25622562
[`process.send()`]: process.html#process_process_send_message_sendhandle_options_callback
25632563
[`process.setUncaughtExceptionCaptureCallback()`]: process.html#process_process_setuncaughtexceptioncapturecallback_fn

doc/api/http.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2383,7 +2383,7 @@ not abort the request or do anything besides add a `'timeout'` event.
23832383
[`net.Server`]: net.html#net_class_net_server
23842384
[`net.Socket`]: net.html#net_class_net_socket
23852385
[`net.createConnection()`]: net.html#net_net_createconnection_options_connectlistener
2386-
[`new URL()`]: url.html#url_constructor_new_url_input_base
2386+
[`new URL()`]: url.html#url_new_url_input_base
23872387
[`removeHeader(name)`]: #http_request_removeheader_name
23882388
[`request.end()`]: #http_request_end_data_encoding_callback
23892389
[`request.flushHeaders()`]: #http_request_flushheaders

doc/api/https.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; p
447447
[`https.Agent`]: #https_class_https_agent
448448
[`https.request()`]: #https_https_request_options_callback
449449
[`net.Server`]: net.html#net_class_net_server
450-
[`new URL()`]: url.html#url_constructor_new_url_input_base
450+
[`new URL()`]: url.html#url_new_url_input_base
451451
[`server.listen()`]: net.html#net_server_listen
452452
[`tls.connect()`]: tls.html#tls_tls_connect_options_callback
453453
[`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
@@ -1739,7 +1739,7 @@ Custom `Writable` streams *must* call the `new stream.Writable([options])`
17391739
constructor and implement the `writable._write()` and/or `writable._writev()`
17401740
method.
17411741

1742-
#### Constructor: `new stream.Writable([options])`
1742+
#### `new stream.Writable([options])`
17431743
<!-- YAML
17441744
changes:
17451745
- version: v10.0.0
@@ -2891,5 +2891,5 @@ contain multi-byte characters.
28912891
[Three states]: #stream_three_states
28922892
[writable-_destroy]: #stream_writable_destroy_err_callback
28932893
[writable-destroy]: #stream_writable_destroy_error
2894-
[writable-new]: #stream_constructor_new_stream_writable_options
2894+
[writable-new]: #stream_new_stream_writable_options
28952895
[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:
@@ -554,7 +554,7 @@ flag enabled.*
554554
The `vm.SourceTextModule` class provides the [Source Text Module Record][] as
555555
defined in the ECMAScript specification.
556556

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

559559
* `code` {string} JavaScript Module code to parse
560560
* `options`
@@ -671,7 +671,7 @@ const module = new vm.SyntheticModule(['default'], function() {
671671
// Use `module` in linking...
672672
```
673673

674-
### Constructor: `new vm.SyntheticModule(exportNames, evaluateCallback[, options])`
674+
### `new vm.SyntheticModule(exportNames, evaluateCallback[, options])`
675675
<!-- YAML
676676
added: v12.16.0
677677
-->

0 commit comments

Comments
 (0)