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 <[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]>
  • Loading branch information
Trott authored and targos committed Apr 2, 2018
1 parent 3a3ae01 commit c5469bb
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 @@ -461,8 +461,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`.

```js
const buf1 = new Buffer('this is a tést');
Expand Down Expand Up @@ -839,8 +839,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`.

```js
const buf1 = Buffer.from('this is a tést');
Expand Down

0 comments on commit c5469bb

Please sign in to comment.