Closed
Description
- Version: v6.4.0
- Platform: Linux x260 4.6.5-200.fc23.x86_64 deps: update openssl to 1.0.1j #1 SMP Thu Jul 28 01:10:25 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
- Subsystem:
The documentation at https://nodejs.org/api/buffer.html#buffer_buf_readuintbe_offset_bytelength_noassert has a few examples, reproduced in part here:
const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
// Prints: 1234567890ab
console.log(buf.readUIntLE(0, 6).toString(16));
// Prints: ab9078563412
console.log(buf.readUIntBE(0, 6).toString(16));
However, the comments describing the output are the opposite of what they should be. The LE example outputs "ab9078563412" whereas the BE example outputs "1234567890ab".