Skip to content

Commit

Permalink
doc: remove "if provided" for optional arguments
Browse files Browse the repository at this point in the history
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 <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott authored and BethGriggs committed Dec 4, 2018
1 parent 216e7da commit 33b7c50
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,8 @@ changes:
* `string` {string} String to encode.
* `encoding` {string} The encoding of `string`. **Default:** `'utf8'`.

Creates a new `Buffer` containing `string`. If provided, the `encoding`
parameter identifies the character encoding of `string`.
Creates a new `Buffer` containing `string`. The `encoding` parameter identifies
the character encoding of `string`.

Examples:

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

Creates a new `Buffer` containing `string`. If provided, the `encoding`
parameter identifies the character encoding of `string`.
Creates a new `Buffer` containing `string`. The `encoding` parameter identifies
the character encoding of `string`.

Examples:

Expand Down

0 comments on commit 33b7c50

Please sign in to comment.