buffer.isAscii(input)


如果 input 仅包含有效的 ASCII 编码数据,包括 input 为空的情况,则此函数返回 true

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

如果 input 是已分离的数组缓冲区,则会抛出异常。

【Throws if the input is a detached array buffer.】