Class Method: Buffer.compare(buf1, buf2)
Compares buf1
to buf2
typically for the purpose of sorting arrays of Buffers. This is equivalent is calling buf1.compare(buf2)
.
const arr = [Buffer.from('1234'), Buffer.from('0123')]; arr.sort(Buffer.compare);
Please login to continue.