@@ -515,8 +515,8 @@ changes:
515
515
-->
516
516
517
517
* ` size ` {integer} The desired length of the new ` Buffer ` .
518
- * ` fill ` {string|Buffer|integer} A value to pre-fill the new ` Buffer ` with.
519
- ** Default:** ` 0 ` .
518
+ * ` fill ` {string|Buffer|Uint8Array| integer} A value to pre-fill the new ` Buffer `
519
+ with. ** Default:** ` 0 ` .
520
520
* ` encoding ` {string} If ` fill ` is a string, this is its encoding.
521
521
** Default:** ` 'utf8' ` .
522
522
@@ -958,6 +958,8 @@ type: property
958
958
name: [index]
959
959
-->
960
960
961
+ * ` index ` {integer}
962
+
961
963
The index operator ` [index] ` can be used to get and set the octet at position
962
964
` index ` in ` buf ` . The values refer to individual bytes, so the legal value
963
965
range is between ` 0x00 ` and ` 0xFF ` (hex) or ` 0 ` and ` 255 ` (decimal).
@@ -1176,8 +1178,8 @@ changes:
1176
1178
description: The arguments can now be `Uint8Array`s.
1177
1179
-->
1178
1180
1179
- * ` otherBuffer ` {Buffer} A ` Buffer ` or [ ` Uint8Array ` ] with which to compare
1180
- ` buf ` .
1181
+ * ` otherBuffer ` {Buffer|Uint8Array } A ` Buffer ` or [ ` Uint8Array ` ] with which to
1182
+ compare ` buf ` .
1181
1183
* Returns: {boolean}
1182
1184
1183
1185
Returns ` true ` if both ` buf ` and ` otherBuffer ` have exactly the same bytes,
@@ -1217,7 +1219,7 @@ changes:
1217
1219
description: The `encoding` parameter is supported now.
1218
1220
-->
1219
1221
1220
- * ` value ` {string|Buffer|integer} The value with which to fill ` buf ` .
1222
+ * ` value ` {string|Buffer|Uint8Array| integer} The value with which to fill ` buf ` .
1221
1223
* ` offset ` {integer} Number of bytes to skip before starting to fill ` buf ` .
1222
1224
** Default:** ` 0 ` .
1223
1225
* ` end ` {integer} Where to stop filling ` buf ` (not inclusive). ** Default:**
@@ -1271,7 +1273,7 @@ console.log(buf.fill('zz', 'hex'));
1271
1273
added: v5.3.0
1272
1274
-->
1273
1275
1274
- * ` value ` {string|Buffer|integer} What to search for.
1276
+ * ` value ` {string|Buffer|Uint8Array| integer} What to search for.
1275
1277
* ` byteOffset ` {integer} Where to begin searching in ` buf ` . ** Default:** ` 0 ` .
1276
1278
* ` encoding ` {string} If ` value ` is a string, this is its encoding.
1277
1279
** Default:** ` 'utf8' ` .
@@ -2515,6 +2517,7 @@ changes:
2515
2517
* ` source ` {Buffer|Uint8Array} A ` Buffer ` or ` Uint8Array ` instance.
2516
2518
* ` fromEnc ` {string} The current encoding.
2517
2519
* ` toEnc ` {string} To target encoding.
2520
+ * Returns: {Buffer}
2518
2521
2519
2522
Re-encodes the given ` Buffer ` or ` Uint8Array ` instance from one character
2520
2523
encoding to another. Returns a new ` Buffer ` instance.
0 commit comments