isBufferRaw
Returns true
if the given object
is a Buffer
. Otherwise, returns false
.
const util = require('node:util');
util.isBuffer({ length: 0 });
// Returns: false
util.isBuffer([]);
// Returns: false
util.isBuffer(Buffer.from('hello world'));
// Returns: true
Content copied to clipboard
Since
v0.11.5