Skip to content

Commit c46e57c

Browse files
committed
doc: update isUtf8 description
1 parent 67a1994 commit c46e57c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

doc/api/buffer.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5137,9 +5137,13 @@ added: REPLACEME
51375137
-->
51385138

51395139
* input {Buffer | ArrayBuffer | TypedArray} The input to validate.
5140-
* Returns: {boolean} Returns `true` if and only if the input is valid UTF-8.
5140+
* Returns: {boolean}
5141+
5142+
This function is used to check if input contains invalid UTF-8 code points
5143+
(characters). Returns `true` if and only if the input does not contain
5144+
non UTF-8 characters.
51415145

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

51445148
### `buffer.INSPECT_MAX_BYTES`
51455149

0 commit comments

Comments
 (0)