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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Rich Trott authored and Michaël Zasso committed 2018-04-02 16:09:31 +02:00
1 parent 3a3ae0134d
commit c5469bb7a8
1 file changed
+4 -4
+4 -4
View File
@@ -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');
@@ -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');