From c5469bb7a8ccb112d024e430b4e81b36f72c6458 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 29 Mar 2018 22:54:37 -0700 Subject: [PATCH] doc: remove "if provided" for optional arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat Reviewed-By: Vse Mozhet Byt Reviewed-By: Shingo Inoue Reviewed-By: Colin Ihrig Reviewed-By: Michaël Zasso Reviewed-By: James M Snell --- doc/api/buffer.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 87fbfd697b4bd5..cf86ccb4979603 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -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');