Skip to main content
isAscii - node__buffer.d.ts - Node documentation
function isAscii

Usage in Deno

```typescript import { isAscii } from "node:node__buffer.d.ts"; ```
isAscii(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

input:
Buffer
| ArrayBuffer
| TypedArray
The input to validate.

Return Type

boolean