util.types.isDataView(value)


如果值为内置的 DataView 实例,则返回 true

const ab = new ArrayBuffer(20);
util.types.isDataView(new DataView(ab));  // 返回 true
util.types.isDataView(new Float64Array());  // 返回 false

另见 ArrayBuffer.isView()

Returns true if the value is a built-in DataView instance.

const ab = new ArrayBuffer(20);
util.types.isDataView(new DataView(ab));  // Returns true
util.types.isDataView(new Float64Array());  // Returns false

See also ArrayBuffer.isView().