From 89df17ed0baa549acd7f7d6bb9f0204219f4bd39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20B=C3=B6hm?= Date: Wed, 16 Mar 2016 11:27:32 +0100 Subject: [PATCH] doc: fix return value of write methods Fixes: https:github.com/nodejs/node/issues/5682 PR-URL: https://github.com/nodejs/node/pull/5736 Reviewed-By: James M Snell Reviewed-By: Benjamin Gruenbaum Reviewed-By: Sakthipriyan Vairamani --- doc/api/buffer.markdown | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/api/buffer.markdown b/doc/api/buffer.markdown index 16cc82150a447c..4c8a48de906508 100644 --- a/doc/api/buffer.markdown +++ b/doc/api/buffer.markdown @@ -1042,7 +1042,7 @@ console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`); * `value` {Number} Bytes to be written to Buffer * `offset` {Number} `0 <= offset <= buf.length - 8` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset` with specified endian format (`writeDoubleBE()` writes big endian, `writeDoubleLE()` writes little @@ -1074,7 +1074,7 @@ console.log(buf); * `value` {Number} Bytes to be written to Buffer * `offset` {Number} `0 <= offset <= buf.length - 4` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset` with specified endian format (`writeFloatBE()` writes big endian, `writeFloatLE()` writes little @@ -1106,7 +1106,7 @@ console.log(buf); * `value` {Number} Bytes to be written to Buffer * `offset` {Number} `0 <= offset <= buf.length - 1` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset`. The `value` must be a valid signed 8-bit integer. @@ -1132,7 +1132,7 @@ console.log(buf); * `value` {Number} Bytes to be written to Buffer * `offset` {Number} `0 <= offset <= buf.length - 2` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset` with specified endian format (`writeInt16BE()` writes big endian, `writeInt16LE()` writes little @@ -1159,7 +1159,7 @@ console.log(buf); * `value` {Number} Bytes to be written to Buffer * `offset` {Number} `0 <= offset <= buf.length - 4` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset` with specified endian format (`writeInt32BE()` writes big endian, `writeInt32LE()` writes little @@ -1187,7 +1187,7 @@ console.log(buf); * `offset` {Number} `0 <= offset <= buf.length - byteLength` * `byteLength` {Number} `0 < byteLength <= 6` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset` and `byteLength`. Supports up to 48 bits of accuracy. For example: @@ -1214,7 +1214,7 @@ should not be used unless you are certain of correctness. * `value` {Number} Bytes to be written to Buffer * `offset` {Number} `0 <= offset <= buf.length - 1` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset`. The `value` must be a valid unsigned 8-bit integer. @@ -1243,7 +1243,7 @@ console.log(buf); * `value` {Number} Bytes to be written to Buffer * `offset` {Number} `0 <= offset <= buf.length - 2` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset` with specified endian format (`writeUInt16BE()` writes big endian, `writeUInt16LE()` writes little @@ -1277,7 +1277,7 @@ console.log(buf); * `value` {Number} Bytes to be written to Buffer * `offset` {Number} `0 <= offset <= buf.length - 4` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset` with specified endian format (`writeUInt32BE()` writes big endian, `writeUInt32LE()` writes little @@ -1310,7 +1310,7 @@ console.log(buf); * `offset` {Number} `0 <= offset <= buf.length - byteLength` * `byteLength` {Number} `0 < byteLength <= 6` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset` and `byteLength`. Supports up to 48 bits of accuracy. For example: