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 RafaelGSS committed Jan 5, 2023
1 parent 54776ff commit e113d16
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 e113d16

Please sign in to comment.