Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: do not identify string as "JavaScript string" #19689

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

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.
  • Loading branch information...
Trott committed Mar 30, 2018
commit 642f6831df1017d8e3de1061a449f02602c235e5
@@ -464,8 +464,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');
@@ -850,8 +850,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');
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.