util.types.isArrayBuffer(value)


如果值为内置的 ArrayBuffer 实例,则返回 true。 这不包括 SharedArrayBuffer 实例。 通常,最好对两者进行测试;参见 util.types.isAnyArrayBuffer()

util.types.isArrayBuffer(new ArrayBuffer());  // 返回 true
util.types.isArrayBuffer(new SharedArrayBuffer());  // 返回 false

Returns true if the value is a built-in ArrayBuffer instance. This does not include SharedArrayBuffer instances. Usually, it is desirable to test for both; See util.types.isAnyArrayBuffer() for that.

util.types.isArrayBuffer(new ArrayBuffer());  // Returns true
util.types.isArrayBuffer(new SharedArrayBuffer());  // Returns false