@@ -688,6 +688,7 @@ changes:
688
688
with. ** Default:** ` 0 ` .
689
689
* ` encoding ` {string} If ` fill ` is a string, this is its encoding.
690
690
** Default:** ` 'utf8' ` .
691
+ * Returns: {Buffer}
691
692
692
693
Allocates a new ` Buffer ` of ` size ` bytes. If ` fill ` is ` undefined ` , the
693
694
` Buffer ` will be zero-filled.
@@ -782,6 +783,7 @@ changes:
782
783
-->
783
784
784
785
* ` size ` {integer} The desired length of the new ` Buffer ` .
786
+ * Returns: {Buffer}
785
787
786
788
Allocates a new ` Buffer ` of ` size ` bytes. If ` size ` is larger than
787
789
[ ` buffer.constants.MAX_LENGTH ` ] [ ] or smaller than 0, [ ` ERR_OUT_OF_RANGE ` ] [ ]
@@ -852,6 +854,7 @@ changes:
852
854
-->
853
855
854
856
* ` size ` {integer} The desired length of the new ` Buffer ` .
857
+ * Returns: {Buffer}
855
858
856
859
Allocates a new ` Buffer ` of ` size ` bytes. If ` size ` is larger than
857
860
[ ` buffer.constants.MAX_LENGTH ` ] [ ] or smaller than 0, [ ` ERR_OUT_OF_RANGE ` ] [ ]
@@ -1098,6 +1101,7 @@ added:
1098
1101
* ` offset ` {integer} The starting offset within ` view ` . ** Default:** : ` 0 ` .
1099
1102
* ` length ` {integer} The number of elements from ` view ` to copy.
1100
1103
** Default:** ` view.length - offset ` .
1104
+ * Returns: {Buffer}
1101
1105
1102
1106
Copies the underlying memory of ` view ` into a new ` Buffer ` .
1103
1107
@@ -1117,6 +1121,7 @@ added: v5.10.0
1117
1121
-->
1118
1122
1119
1123
* ` array ` {integer\[ ] }
1124
+ * Returns: {Buffer}
1120
1125
1121
1126
Allocates a new ` Buffer ` using an ` array ` of bytes in the range ` 0 ` – ` 255 ` .
1122
1127
Array entries outside that range will be truncated to fit into it.
@@ -1159,6 +1164,7 @@ added: v5.10.0
1159
1164
* ` byteOffset ` {integer} Index of first byte to expose. ** Default:** ` 0 ` .
1160
1165
* ` length ` {integer} Number of bytes to expose.
1161
1166
** Default:** ` arrayBuffer.byteLength - byteOffset ` .
1167
+ * Returns: {Buffer}
1162
1168
1163
1169
This creates a view of the [ ` ArrayBuffer ` ] [ ] without copying the underlying
1164
1170
memory. For example, when passed a reference to the ` .buffer ` property of a
@@ -1271,6 +1277,7 @@ added: v5.10.0
1271
1277
1272
1278
* ` buffer ` {Buffer|Uint8Array} An existing ` Buffer ` or [ ` Uint8Array ` ] [ ] from
1273
1279
which to copy data.
1280
+ * Returns: {Buffer}
1274
1281
1275
1282
Copies the passed ` buffer ` data onto a new ` Buffer ` instance.
1276
1283
@@ -1314,6 +1321,7 @@ added: v8.2.0
1314
1321
* ` object ` {Object} An object supporting ` Symbol.toPrimitive ` or ` valueOf() ` .
1315
1322
* ` offsetOrEncoding ` {integer|string} A byte-offset or encoding.
1316
1323
* ` length ` {integer} A length.
1324
+ * Returns: {Buffer}
1317
1325
1318
1326
For objects whose ` valueOf() ` function returns a value not strictly equal to
1319
1327
` object ` , returns ` Buffer.from(object.valueOf(), offsetOrEncoding, length) ` .
@@ -1372,6 +1380,7 @@ added: v5.10.0
1372
1380
1373
1381
* ` string ` {string} A string to encode.
1374
1382
* ` encoding ` {string} The encoding of ` string ` . ** Default:** ` 'utf8' ` .
1383
+ * Returns: {Buffer}
1375
1384
1376
1385
Creates a new ` Buffer ` containing ` string ` . The ` encoding ` parameter identifies
1377
1386
the character encoding to be used when converting ` string ` into bytes.
0 commit comments