Skip to content

Commit

Permalink
doc: standardize constructor doc header layout
Browse files Browse the repository at this point in the history
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 <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
  • Loading branch information
Trott authored and codebytere committed Jun 18, 2020
1 parent 524daf8 commit 114d77e
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -3512,7 +3512,7 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.
[`keyObject.export()`]: #crypto_keyobject_export_options
[`sign.sign()`]: #crypto_sign_sign_privatekey_outputencoding
[`sign.update()`]: #crypto_sign_update_data_inputencoding
[`stream.Writable` options]: stream.html#stream_constructor_new_stream_writable_options
[`stream.Writable` options]: stream.html#stream_new_stream_writable_options
[`stream.transform` options]: stream.html#stream_new_stream_transform_options
[`util.promisify()`]: util.html#util_util_promisify_original
[`verify.update()`]: #crypto_verify_update_data_inputencoding
Expand Down
4 changes: 2 additions & 2 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2580,8 +2580,8 @@ such as `process.stdout.on('data')`.
[`https`]: https.html
[`libuv Error handling`]: http://docs.libuv.org/en/v1.x/errors.html
[`net`]: net.html
[`new URL(input)`]: url.html#url_constructor_new_url_input_base
[`new URLSearchParams(iterable)`]: url.html#url_constructor_new_urlsearchparams_iterable
[`new URL(input)`]: url.html#url_new_url_input_base
[`new URLSearchParams(iterable)`]: url.html#url_new_urlsearchparams_iterable
[`process.on('exit')`]: process.html#Event:-`'exit'`
[`process.send()`]: process.html#process_process_send_message_sendhandle_options_callback
[`process.setUncaughtExceptionCaptureCallback()`]: process.html#process_process_setuncaughtexceptioncapturecallback_fn
Expand Down
2 changes: 1 addition & 1 deletion doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -2596,7 +2596,7 @@ try {
[`net.Server`]: net.html#net_class_net_server
[`net.Socket`]: net.html#net_class_net_socket
[`net.createConnection()`]: net.html#net_net_createconnection_options_connectlistener
[`new URL()`]: url.html#url_constructor_new_url_input_base
[`new URL()`]: url.html#url_new_url_input_base
[`removeHeader(name)`]: #http_request_removeheader_name
[`request.end()`]: #http_request_end_data_encoding_callback
[`request.destroy()`]: #http_request_destroy_error
Expand Down
2 changes: 1 addition & 1 deletion doc/api/https.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; p
[`https.Agent`]: #https_class_https_agent
[`https.request()`]: #https_https_request_options_callback
[`net.Server`]: net.html#net_class_net_server
[`new URL()`]: url.html#url_constructor_new_url_input_base
[`new URL()`]: url.html#url_new_url_input_base
[`server.listen()`]: net.html#net_server_listen
[`tls.connect()`]: tls.html#tls_tls_connect_options_callback
[`tls.createSecureContext()`]: tls.html#tls_tls_createsecurecontext_options
Expand Down
2 changes: 1 addition & 1 deletion doc/api/inspector.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ An exception will be thrown if there is no active inspector.
The `inspector.Session` is used for dispatching messages to the V8 inspector
back-end and receiving message responses and notifications.

### Constructor: `new inspector.Session()`
### `new inspector.Session()`
<!-- YAML
added: v8.0.0
-->
Expand Down
4 changes: 2 additions & 2 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,7 @@ Custom `Writable` streams *must* call the `new stream.Writable([options])`
constructor and implement the `writable._write()` and/or `writable._writev()`
method.

#### Constructor: `new stream.Writable([options])`
#### `new stream.Writable([options])`
<!-- YAML
changes:
- version: v14.0.0
Expand Down Expand Up @@ -2978,5 +2978,5 @@ contain multi-byte characters.
[Stream Three States]: #stream_three_states
[writable-_destroy]: #stream_writable_destroy_err_callback
[writable-destroy]: #stream_writable_destroy_error
[writable-new]: #stream_constructor_new_stream_writable_options
[writable-new]: #stream_new_stream_writable_options
[zlib]: zlib.html
12 changes: 6 additions & 6 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ using the `delete` keyword on any properties of `URL` objects (e.g. `delete
myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still
return `true`.

#### Constructor: `new URL(input[, base])`
#### `new URL(input[, base])`

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

#### Constructor: `new URLSearchParams()`
#### `new URLSearchParams()`

Instantiate a new empty `URLSearchParams` object.

#### Constructor: `new URLSearchParams(string)`
#### `new URLSearchParams(string)`

* `string` {string} A query string

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

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

#### Constructor: `new URLSearchParams(iterable)`
#### `new URLSearchParams(iterable)`
<!-- YAML
added:
- v7.10.0
Expand Down Expand Up @@ -1341,7 +1341,7 @@ console.log(myURL.origin);
[`TypeError`]: errors.html#errors_class_typeerror
[`URLSearchParams`]: #url_class_urlsearchparams
[`array.toString()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString
[`new URL()`]: #url_constructor_new_url_input_base
[`new URL()`]: #url_new_url_input_base
[`querystring`]: querystring.html
[`require('url').format()`]: #url_url_format_url_options
[`url.domainToASCII()`]: #url_url_domaintoascii_domain
Expand Down
2 changes: 1 addition & 1 deletion doc/api/v8.md
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ A subclass of [`Deserializer`][] corresponding to the format written by
[`serializer.releaseBuffer()`]: #v8_serializer_releasebuffer
[`serializer.transferArrayBuffer()`]: #v8_serializer_transferarraybuffer_id_arraybuffer
[`serializer.writeRawBytes()`]: #v8_serializer_writerawbytes_buffer
[`vm.Script`]: vm.html#vm_constructor_new_vm_script_code_options
[`vm.Script`]: vm.html#vm_new_vm_script_code_options
[HTML structured clone algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
[V8]: https://developers.google.com/v8/
[Worker Threads]: worker_threads.html
6 changes: 3 additions & 3 deletions doc/api/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ added: v0.3.1
Instances of the `vm.Script` class contain precompiled scripts that can be
executed in specific contexts.

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

### Constructor: `new vm.SourceTextModule(code[, options])`
### `new vm.SourceTextModule(code[, options])`

* `code` {string} JavaScript Module code to parse
* `options`
Expand Down Expand Up @@ -747,7 +747,7 @@ const module = new vm.SyntheticModule(['default'], function() {
// Use `module` in linking...
```

### Constructor: `new vm.SyntheticModule(exportNames, evaluateCallback[, options])`
### `new vm.SyntheticModule(exportNames, evaluateCallback[, options])`
<!-- YAML
added:
- v13.0.0
Expand Down

0 comments on commit 114d77e

Please sign in to comment.