Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2307a74

Browse filesBrowse files
anonrigjuanarbol
authored andcommitted
doc: update isUtf8 description
PR-URL: #45973 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent b48e82e commit 2307a74
Copy full SHA for 2307a74

File tree

Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Open diff view settings
Collapse file

‎doc/api/buffer.md‎

Copy file name to clipboardExpand all lines: doc/api/buffer.md
+5-2Lines changed: 5 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -5133,9 +5133,12 @@ added: REPLACEME
51335133
-->
51345134

51355135
* input {Buffer | ArrayBuffer | TypedArray} The input to validate.
5136-
* Returns: {boolean} Returns `true` if and only if the input is valid UTF-8.
5136+
* Returns: {boolean}
5137+
5138+
This function returns `true` if `input` contains only valid UTF-8-encoded data,
5139+
including the case in which `input` is empty.
51375140

5138-
This function is used to check if input contains UTF-8 code points (characters).
5141+
Throws if the `input` is a detached array buffer.
51395142

51405143
### `buffer.INSPECT_MAX_BYTES`
51415144

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.