util.types.isSharedArrayBuffer(value)


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

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

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

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