Skip to main content

isAscii

function isAscii
Jump to headingisAscii(input:
Buffer
| ArrayBuffer
| TypedArray
): boolean

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

Throws if the input is a detached array buffer.

Parameters Jump to heading

Jump to headinginput:
Buffer
| ArrayBuffer
| TypedArray

The input to validate.

Return Type Jump to heading

boolean
Back to top