Stability: 0 - Deprecated: Use [
Buffer.isBuffer()
][] instead.
object
{any}- Returns: {boolean}
Returns true
if the given object
is a Buffer
. Otherwise, returns false
.
const util = require('util');
util.isBuffer({ length: 0 });
// Returns: false
util.isBuffer([]);
// Returns: false
util.isBuffer(Buffer.from('hello world'));
// Returns: true