diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 612f7a67181494..28c1dbb9452727 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -5138,6 +5138,20 @@ For code running using Node.js APIs, converting between base64-encoded strings and binary data should be performed using `Buffer.from(str, 'base64')` and `buf.toString('base64')`.** +### `buffer.isAscii(input)` + + + +* input {Buffer | ArrayBuffer | TypedArray} The input to validate. +* Returns: {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. + ### `buffer.isUtf8(input)`