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 <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
  • Loading branch information
anonrig authored and RafaelGSS committed Jan 2, 2023
1 parent 5966635 commit 3162984
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 3162984

Please sign in to comment.