Skip to content

Commit

Permalink
doc: update isUtf8 description
Browse files Browse the repository at this point in the history
PR-URL: #45973
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
anonrig authored Jan 1, 2023
1 parent 361d34c commit 5ba1717
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -5137,9 +5137,12 @@ added: REPLACEME
-->

* input {Buffer | ArrayBuffer | TypedArray} The input to validate.
* Returns: {boolean} Returns `true` if and only if the input is valid UTF-8.
* Returns: {boolean}

This function returns `true` if `input` contains only valid UTF-8-encoded data,
including the case in which `input` is empty.

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

### `buffer.INSPECT_MAX_BYTES`

Expand Down

0 comments on commit 5ba1717

Please sign in to comment.