Browse Source

doc: fix copy-paste artifacts in the buffer.md

PR-URL: https://github.com/nodejs/node/pull/9795
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
v6
Vse Mozhet Byt 8 years ago
committed by Anna Henningsen
parent
commit
96e5017449
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  1. 6
      doc/api/buffer.md

6
doc/api/buffer.md

@ -1509,10 +1509,10 @@ Examples:
```js
const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
// Prints: 1234567890ab
// Prints: -546f87a9cbee
console.log(buf.readIntLE(0, 6).toString(16));
// Prints: -546f87a9cbee
// Prints: 1234567890ab
console.log(buf.readIntBE(0, 6).toString(16));
// Throws an exception: RangeError: Index out of range
@ -1737,7 +1737,7 @@ console.log(buf1);
const buf2 = Buffer.from([0x1, 0x2, 0x3]);
// Throws an exception: RangeError: Buffer size must be a multiple of 16-bits
buf2.swap32();
buf2.swap16();
```
### buf.swap32()

Loading…
Cancel
Save