Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 939d6ef

Browse filesBrowse files
fb55jasnell
authored andcommitted
doc: fix return value of write methods
Fixes: https:github.com//issues/5682 PR-URL: #5736 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1 parent f9e6191 commit 939d6ef
Copy full SHA for 939d6ef

File tree

Expand file treeCollapse file tree

1 file changed

+10
-10
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-10
lines changed
Open diff view settings
Collapse file

‎doc/api/buffer.markdown‎

Copy file name to clipboardExpand all lines: doc/api/buffer.markdown
+10-10Lines changed: 10 additions & 10 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,7 @@ console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);
13551355
* `value` {Number} Bytes to be written to Buffer
13561356
* `offset` {Number} `0 <= offset <= buf.length - 8`
13571357
* `noAssert` {Boolean} Default: false
1358-
* Return: {Number} Numbers of bytes written
1358+
* Return: {Number} The offset plus the number of written bytes
13591359

13601360
Writes `value` to the Buffer at the specified `offset` with specified endian
13611361
format (`writeDoubleBE()` writes big endian, `writeDoubleLE()` writes little
@@ -1387,7 +1387,7 @@ console.log(buf);
13871387
* `value` {Number} Bytes to be written to Buffer
13881388
* `offset` {Number} `0 <= offset <= buf.length - 4`
13891389
* `noAssert` {Boolean} Default: false
1390-
* Return: {Number} Numbers of bytes written
1390+
* Return: {Number} The offset plus the number of written bytes
13911391

13921392
Writes `value` to the Buffer at the specified `offset` with specified endian
13931393
format (`writeFloatBE()` writes big endian, `writeFloatLE()` writes little
@@ -1419,7 +1419,7 @@ console.log(buf);
14191419
* `value` {Number} Bytes to be written to Buffer
14201420
* `offset` {Number} `0 <= offset <= buf.length - 1`
14211421
* `noAssert` {Boolean} Default: false
1422-
* Return: {Number} Numbers of bytes written
1422+
* Return: {Number} The offset plus the number of written bytes
14231423

14241424
Writes `value` to the Buffer at the specified `offset`. The `value` must be a
14251425
valid signed 8-bit integer.
@@ -1445,7 +1445,7 @@ console.log(buf);
14451445
* `value` {Number} Bytes to be written to Buffer
14461446
* `offset` {Number} `0 <= offset <= buf.length - 2`
14471447
* `noAssert` {Boolean} Default: false
1448-
* Return: {Number} Numbers of bytes written
1448+
* Return: {Number} The offset plus the number of written bytes
14491449

14501450
Writes `value` to the Buffer at the specified `offset` with specified endian
14511451
format (`writeInt16BE()` writes big endian, `writeInt16LE()` writes little
@@ -1472,7 +1472,7 @@ console.log(buf);
14721472
* `value` {Number} Bytes to be written to Buffer
14731473
* `offset` {Number} `0 <= offset <= buf.length - 4`
14741474
* `noAssert` {Boolean} Default: false
1475-
* Return: {Number} Numbers of bytes written
1475+
* Return: {Number} The offset plus the number of written bytes
14761476

14771477
Writes `value` to the Buffer at the specified `offset` with specified endian
14781478
format (`writeInt32BE()` writes big endian, `writeInt32LE()` writes little
@@ -1500,7 +1500,7 @@ console.log(buf);
15001500
* `offset` {Number} `0 <= offset <= buf.length - byteLength`
15011501
* `byteLength` {Number} `0 < byteLength <= 6`
15021502
* `noAssert` {Boolean} Default: false
1503-
* Return: {Number} Numbers of bytes written
1503+
* Return: {Number} The offset plus the number of written bytes
15041504

15051505
Writes `value` to the Buffer at the specified `offset` and `byteLength`.
15061506
Supports up to 48 bits of accuracy. For example:
@@ -1527,7 +1527,7 @@ should not be used unless you are certain of correctness.
15271527
* `value` {Number} Bytes to be written to Buffer
15281528
* `offset` {Number} `0 <= offset <= buf.length - 1`
15291529
* `noAssert` {Boolean} Default: false
1530-
* Return: {Number} Numbers of bytes written
1530+
* Return: {Number} The offset plus the number of written bytes
15311531

15321532
Writes `value` to the Buffer at the specified `offset`. The `value` must be a
15331533
valid unsigned 8-bit integer.
@@ -1556,7 +1556,7 @@ console.log(buf);
15561556
* `value` {Number} Bytes to be written to Buffer
15571557
* `offset` {Number} `0 <= offset <= buf.length - 2`
15581558
* `noAssert` {Boolean} Default: false
1559-
* Return: {Number} Numbers of bytes written
1559+
* Return: {Number} The offset plus the number of written bytes
15601560

15611561
Writes `value` to the Buffer at the specified `offset` with specified endian
15621562
format (`writeUInt16BE()` writes big endian, `writeUInt16LE()` writes little
@@ -1590,7 +1590,7 @@ console.log(buf);
15901590
* `value` {Number} Bytes to be written to Buffer
15911591
* `offset` {Number} `0 <= offset <= buf.length - 4`
15921592
* `noAssert` {Boolean} Default: false
1593-
* Return: {Number} Numbers of bytes written
1593+
* Return: {Number} The offset plus the number of written bytes
15941594

15951595
Writes `value` to the Buffer at the specified `offset` with specified endian
15961596
format (`writeUInt32BE()` writes big endian, `writeUInt32LE()` writes little
@@ -1623,7 +1623,7 @@ console.log(buf);
16231623
* `offset` {Number} `0 <= offset <= buf.length - byteLength`
16241624
* `byteLength` {Number} `0 < byteLength <= 6`
16251625
* `noAssert` {Boolean} Default: false
1626-
* Return: {Number} Numbers of bytes written
1626+
* Return: {Number} The offset plus the number of written bytes
16271627

16281628
Writes `value` to the Buffer at the specified `offset` and `byteLength`.
16291629
Supports up to 48 bits of accuracy. For example:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.