Skip to content

Commit 2c82efb

Browse files
fb55Myles Borins
authored and
Myles Borins
committed
doc: fix return value of write methods
Fixes: https:github.com/nodejs/node/issues/5682 PR-URL: nodejs/node#5736 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
1 parent fa3ed70 commit 2c82efb

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

doc/api/buffer.markdown

+10-10
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);
10271027
* `value` {Number} Bytes to be written to Buffer
10281028
* `offset` {Number} `0 <= offset <= buf.length - 8`
10291029
* `noAssert` {Boolean} Default: false
1030-
* Return: {Number} Numbers of bytes written
1030+
* Return: {Number} The offset plus the number of written bytes
10311031

10321032
Writes `value` to the Buffer at the specified `offset` with specified endian
10331033
format (`writeDoubleBE()` writes big endian, `writeDoubleLE()` writes little
@@ -1059,7 +1059,7 @@ console.log(buf);
10591059
* `value` {Number} Bytes to be written to Buffer
10601060
* `offset` {Number} `0 <= offset <= buf.length - 4`
10611061
* `noAssert` {Boolean} Default: false
1062-
* Return: {Number} Numbers of bytes written
1062+
* Return: {Number} The offset plus the number of written bytes
10631063

10641064
Writes `value` to the Buffer at the specified `offset` with specified endian
10651065
format (`writeFloatBE()` writes big endian, `writeFloatLE()` writes little
@@ -1091,7 +1091,7 @@ console.log(buf);
10911091
* `value` {Number} Bytes to be written to Buffer
10921092
* `offset` {Number} `0 <= offset <= buf.length - 1`
10931093
* `noAssert` {Boolean} Default: false
1094-
* Return: {Number} Numbers of bytes written
1094+
* Return: {Number} The offset plus the number of written bytes
10951095

10961096
Writes `value` to the Buffer at the specified `offset`. The `value` must be a
10971097
valid signed 8-bit integer.
@@ -1117,7 +1117,7 @@ console.log(buf);
11171117
* `value` {Number} Bytes to be written to Buffer
11181118
* `offset` {Number} `0 <= offset <= buf.length - 2`
11191119
* `noAssert` {Boolean} Default: false
1120-
* Return: {Number} Numbers of bytes written
1120+
* Return: {Number} The offset plus the number of written bytes
11211121

11221122
Writes `value` to the Buffer at the specified `offset` with specified endian
11231123
format (`writeInt16BE()` writes big endian, `writeInt16LE()` writes little
@@ -1144,7 +1144,7 @@ console.log(buf);
11441144
* `value` {Number} Bytes to be written to Buffer
11451145
* `offset` {Number} `0 <= offset <= buf.length - 4`
11461146
* `noAssert` {Boolean} Default: false
1147-
* Return: {Number} Numbers of bytes written
1147+
* Return: {Number} The offset plus the number of written bytes
11481148

11491149
Writes `value` to the Buffer at the specified `offset` with specified endian
11501150
format (`writeInt32BE()` writes big endian, `writeInt32LE()` writes little
@@ -1172,7 +1172,7 @@ console.log(buf);
11721172
* `offset` {Number} `0 <= offset <= buf.length - byteLength`
11731173
* `byteLength` {Number} `0 < byteLength <= 6`
11741174
* `noAssert` {Boolean} Default: false
1175-
* Return: {Number} Numbers of bytes written
1175+
* Return: {Number} The offset plus the number of written bytes
11761176

11771177
Writes `value` to the Buffer at the specified `offset` and `byteLength`.
11781178
Supports up to 48 bits of accuracy. For example:
@@ -1199,7 +1199,7 @@ should not be used unless you are certain of correctness.
11991199
* `value` {Number} Bytes to be written to Buffer
12001200
* `offset` {Number} `0 <= offset <= buf.length - 1`
12011201
* `noAssert` {Boolean} Default: false
1202-
* Return: {Number} Numbers of bytes written
1202+
* Return: {Number} The offset plus the number of written bytes
12031203

12041204
Writes `value` to the Buffer at the specified `offset`. The `value` must be a
12051205
valid unsigned 8-bit integer.
@@ -1228,7 +1228,7 @@ console.log(buf);
12281228
* `value` {Number} Bytes to be written to Buffer
12291229
* `offset` {Number} `0 <= offset <= buf.length - 2`
12301230
* `noAssert` {Boolean} Default: false
1231-
* Return: {Number} Numbers of bytes written
1231+
* Return: {Number} The offset plus the number of written bytes
12321232

12331233
Writes `value` to the Buffer at the specified `offset` with specified endian
12341234
format (`writeUInt16BE()` writes big endian, `writeUInt16LE()` writes little
@@ -1262,7 +1262,7 @@ console.log(buf);
12621262
* `value` {Number} Bytes to be written to Buffer
12631263
* `offset` {Number} `0 <= offset <= buf.length - 4`
12641264
* `noAssert` {Boolean} Default: false
1265-
* Return: {Number} Numbers of bytes written
1265+
* Return: {Number} The offset plus the number of written bytes
12661266

12671267
Writes `value` to the Buffer at the specified `offset` with specified endian
12681268
format (`writeUInt32BE()` writes big endian, `writeUInt32LE()` writes little
@@ -1295,7 +1295,7 @@ console.log(buf);
12951295
* `offset` {Number} `0 <= offset <= buf.length - byteLength`
12961296
* `byteLength` {Number} `0 < byteLength <= 6`
12971297
* `noAssert` {Boolean} Default: false
1298-
* Return: {Number} Numbers of bytes written
1298+
* Return: {Number} The offset plus the number of written bytes
12991299

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

0 commit comments

Comments
 (0)