Skip to content

Commit 89df17e

Browse files
fb55Fishrock123
authored andcommitted
doc: fix return value of write methods
Fixes: https:github.com//issues/5682 PR-URL: #5736 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
1 parent 5ab51ee commit 89df17e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

doc/api/buffer.markdown

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);
10421042
* `value` {Number} Bytes to be written to Buffer
10431043
* `offset` {Number} `0 <= offset <= buf.length - 8`
10441044
* `noAssert` {Boolean} Default: false
1045-
* Return: {Number} Numbers of bytes written
1045+
* Return: {Number} The offset plus the number of written bytes
10461046

10471047
Writes `value` to the Buffer at the specified `offset` with specified endian
10481048
format (`writeDoubleBE()` writes big endian, `writeDoubleLE()` writes little
@@ -1074,7 +1074,7 @@ console.log(buf);
10741074
* `value` {Number} Bytes to be written to Buffer
10751075
* `offset` {Number} `0 <= offset <= buf.length - 4`
10761076
* `noAssert` {Boolean} Default: false
1077-
* Return: {Number} Numbers of bytes written
1077+
* Return: {Number} The offset plus the number of written bytes
10781078

10791079
Writes `value` to the Buffer at the specified `offset` with specified endian
10801080
format (`writeFloatBE()` writes big endian, `writeFloatLE()` writes little
@@ -1106,7 +1106,7 @@ console.log(buf);
11061106
* `value` {Number} Bytes to be written to Buffer
11071107
* `offset` {Number} `0 <= offset <= buf.length - 1`
11081108
* `noAssert` {Boolean} Default: false
1109-
* Return: {Number} Numbers of bytes written
1109+
* Return: {Number} The offset plus the number of written bytes
11101110

11111111
Writes `value` to the Buffer at the specified `offset`. The `value` must be a
11121112
valid signed 8-bit integer.
@@ -1132,7 +1132,7 @@ console.log(buf);
11321132
* `value` {Number} Bytes to be written to Buffer
11331133
* `offset` {Number} `0 <= offset <= buf.length - 2`
11341134
* `noAssert` {Boolean} Default: false
1135-
* Return: {Number} Numbers of bytes written
1135+
* Return: {Number} The offset plus the number of written bytes
11361136

11371137
Writes `value` to the Buffer at the specified `offset` with specified endian
11381138
format (`writeInt16BE()` writes big endian, `writeInt16LE()` writes little
@@ -1159,7 +1159,7 @@ console.log(buf);
11591159
* `value` {Number} Bytes to be written to Buffer
11601160
* `offset` {Number} `0 <= offset <= buf.length - 4`
11611161
* `noAssert` {Boolean} Default: false
1162-
* Return: {Number} Numbers of bytes written
1162+
* Return: {Number} The offset plus the number of written bytes
11631163

11641164
Writes `value` to the Buffer at the specified `offset` with specified endian
11651165
format (`writeInt32BE()` writes big endian, `writeInt32LE()` writes little
@@ -1187,7 +1187,7 @@ console.log(buf);
11871187
* `offset` {Number} `0 <= offset <= buf.length - byteLength`
11881188
* `byteLength` {Number} `0 < byteLength <= 6`
11891189
* `noAssert` {Boolean} Default: false
1190-
* Return: {Number} Numbers of bytes written
1190+
* Return: {Number} The offset plus the number of written bytes
11911191

11921192
Writes `value` to the Buffer at the specified `offset` and `byteLength`.
11931193
Supports up to 48 bits of accuracy. For example:
@@ -1214,7 +1214,7 @@ should not be used unless you are certain of correctness.
12141214
* `value` {Number} Bytes to be written to Buffer
12151215
* `offset` {Number} `0 <= offset <= buf.length - 1`
12161216
* `noAssert` {Boolean} Default: false
1217-
* Return: {Number} Numbers of bytes written
1217+
* Return: {Number} The offset plus the number of written bytes
12181218

12191219
Writes `value` to the Buffer at the specified `offset`. The `value` must be a
12201220
valid unsigned 8-bit integer.
@@ -1243,7 +1243,7 @@ console.log(buf);
12431243
* `value` {Number} Bytes to be written to Buffer
12441244
* `offset` {Number} `0 <= offset <= buf.length - 2`
12451245
* `noAssert` {Boolean} Default: false
1246-
* Return: {Number} Numbers of bytes written
1246+
* Return: {Number} The offset plus the number of written bytes
12471247

12481248
Writes `value` to the Buffer at the specified `offset` with specified endian
12491249
format (`writeUInt16BE()` writes big endian, `writeUInt16LE()` writes little
@@ -1277,7 +1277,7 @@ console.log(buf);
12771277
* `value` {Number} Bytes to be written to Buffer
12781278
* `offset` {Number} `0 <= offset <= buf.length - 4`
12791279
* `noAssert` {Boolean} Default: false
1280-
* Return: {Number} Numbers of bytes written
1280+
* Return: {Number} The offset plus the number of written bytes
12811281

12821282
Writes `value` to the Buffer at the specified `offset` with specified endian
12831283
format (`writeUInt32BE()` writes big endian, `writeUInt32LE()` writes little
@@ -1310,7 +1310,7 @@ console.log(buf);
13101310
* `offset` {Number} `0 <= offset <= buf.length - byteLength`
13111311
* `byteLength` {Number} `0 < byteLength <= 6`
13121312
* `noAssert` {Boolean} Default: false
1313-
* Return: {Number} Numbers of bytes written
1313+
* Return: {Number} The offset plus the number of written bytes
13141314

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

0 commit comments

Comments
 (0)