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 and juanarbol committed Jan 31, 2023
1 parent b48e82e commit 2307a74
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions doc/api/buffer.md
Expand Up @@ -5133,9 +5133,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 2307a74

Please sign in to comment.