doc: do not identify string as "JavaScript string"

A parameter that is explicitly identified as a string does not need to
be further specified in the text as a "JavaScript string". Remove the
type altogether as it is indicated in the argument description.

PR-URL: https://github.com/nodejs/node/pull/19689
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Rich Trott 2018-03-29 22:50:52 -07:00
parent 52a9f42d97
commit a3160b7a29

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 the given JavaScript string `string`. If
provided, the `encoding` parameter identifies the character encoding of `string`.
Creates a new `Buffer` containing `string`. If provided, the `encoding`
parameter identifies the character encoding of `string`.
```js
const buf1 = new Buffer('this is a tést');
@ -847,8 +847,8 @@ added: v5.10.0
* `string` {string} A string to encode.
* `encoding` {string} The encoding of `string`. **Default:** `'utf8'`
Creates a new `Buffer` containing the given JavaScript string `string`. If
provided, the `encoding` parameter identifies the character encoding of `string`.
Creates a new `Buffer` containing `string`. If provided, the `encoding`
parameter identifies the character encoding of `string`.
```js
const buf1 = Buffer.from('this is a tést');