Skip to content

Commit 33b7c50

Browse files
TrottBethGriggs
authored andcommitted
doc: remove "if provided" for optional arguments
Remove "if provided" when discussing arguments that are explicitly indicated to be optional and have default values. PR-URL: #19690 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Shingo Inoue <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 216e7da commit 33b7c50

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/buffer.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,8 @@ changes:
483483
* `string` {string} String to encode.
484484
* `encoding` {string} The encoding of `string`. **Default:** `'utf8'`.
485485

486-
Creates a new `Buffer` containing `string`. If provided, the `encoding`
487-
parameter identifies the character encoding of `string`.
486+
Creates a new `Buffer` containing `string`. The `encoding` parameter identifies
487+
the character encoding of `string`.
488488

489489
Examples:
490490

@@ -891,8 +891,8 @@ added: v5.10.0
891891
* `string` {string} A string to encode.
892892
* `encoding` {string} The encoding of `string`. **Default:** `'utf8'`.
893893

894-
Creates a new `Buffer` containing `string`. If provided, the `encoding`
895-
parameter identifies the character encoding of `string`.
894+
Creates a new `Buffer` containing `string`. The `encoding` parameter identifies
895+
the character encoding of `string`.
896896

897897
Examples:
898898

0 commit comments

Comments
 (0)