buf.equals(otherBuffer)
Returns a boolean indicating whether this
and otherBuffer
have exactly the same bytes.
const buf1 = Buffer.from('ABC'); const buf2 = Buffer.from('414243', 'hex'); const buf3 = Buffer.from('ABCD'); console.log(buf1.equals(buf2)); // Prints: true console.log(buf1.equals(buf3)); // Prints: false
Please login to continue.