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