@@ -478,8 +478,8 @@ changes:
478
478
> Stability: 0 - Deprecated:
479
479
> Use [ ` Buffer.from(string[, encoding]) ` ] [ `Buffer.from(string)` ] instead.
480
480
481
- * ` string ` {String } String to encode
482
- * ` encoding ` {String } The encoding of ` string ` . ** Default:** ` 'utf8' `
481
+ * ` string ` {string } String to encode
482
+ * ` encoding ` {string } The encoding of ` string ` . ** Default:** ` 'utf8' `
483
483
484
484
Creates a new ` Buffer ` containing the given JavaScript string ` string ` . If
485
485
provided, the ` encoding ` parameter identifies the character encoding of ` string ` .
@@ -508,9 +508,9 @@ added: v5.10.0
508
508
-->
509
509
510
510
* ` size ` {Integer} The desired length of the new ` Buffer `
511
- * ` fill ` {String | Buffer | Integer} A value to pre-fill the new ` Buffer ` with.
511
+ * ` fill ` {string | Buffer | Integer} A value to pre-fill the new ` Buffer ` with.
512
512
** Default:** ` 0 `
513
- * ` encoding ` {String } If ` fill ` is a string, this is its encoding.
513
+ * ` encoding ` {string } If ` fill ` is a string, this is its encoding.
514
514
** Default:** ` 'utf8' `
515
515
516
516
Allocates a new ` Buffer ` of ` size ` bytes. If ` fill ` is ` undefined ` , the
@@ -674,9 +674,9 @@ changes:
674
674
or `ArrayBuffer`.
675
675
-->
676
676
677
- * ` string ` {String | Buffer | TypedArray | DataView | ArrayBuffer} A value to
677
+ * ` string ` {string | Buffer | TypedArray | DataView | ArrayBuffer} A value to
678
678
calculate the length of
679
- * ` encoding ` {String } If ` string ` is a string, this is its encoding.
679
+ * ` encoding ` {string } If ` string ` is a string, this is its encoding.
680
680
** Default:** ` 'utf8' `
681
681
* Returns: {Integer} The number of bytes contained within ` string `
682
682
@@ -876,8 +876,8 @@ A `TypeError` will be thrown if `buffer` is not a `Buffer`.
876
876
added: v5.10.0
877
877
-->
878
878
879
- * ` string ` {String } A string to encode.
880
- * ` encoding ` {String } The encoding of ` string ` . ** Default:** ` 'utf8' `
879
+ * ` string ` {string } A string to encode.
880
+ * ` encoding ` {string } The encoding of ` string ` . ** Default:** ` 'utf8' `
881
881
882
882
Creates a new ` Buffer ` containing the given JavaScript string ` string ` . If
883
883
provided, the ` encoding ` parameter identifies the character encoding of ` string ` .
@@ -917,7 +917,7 @@ Returns `true` if `obj` is a `Buffer`, `false` otherwise.
917
917
added: v0.9.1
918
918
-->
919
919
920
- * ` encoding ` {String } A character encoding name to check
920
+ * ` encoding ` {string } A character encoding name to check
921
921
* Returns: {Boolean}
922
922
923
923
Returns ` true ` if ` encoding ` contains a supported character encoding, or ` false `
@@ -1170,10 +1170,10 @@ changes:
1170
1170
description: The `encoding` parameter is supported now.
1171
1171
-->
1172
1172
1173
- * ` value ` {String | Buffer | Integer} The value to fill ` buf ` with
1173
+ * ` value ` {string | Buffer | Integer} The value to fill ` buf ` with
1174
1174
* ` offset ` {Integer} Where to start filling ` buf ` . ** Default:** ` 0 `
1175
1175
* ` end ` {Integer} Where to stop filling ` buf ` (not inclusive). ** Default:** [ ` buf.length ` ]
1176
- * ` encoding ` {String } If ` value ` is a string, this is its encoding.
1176
+ * ` encoding ` {string } If ` value ` is a string, this is its encoding.
1177
1177
** Default:** ` 'utf8' `
1178
1178
* Returns: {Buffer} A reference to ` buf `
1179
1179
@@ -1207,9 +1207,9 @@ console.log(Buffer.allocUnsafe(3).fill('\u0222'));
1207
1207
added: v5.3.0
1208
1208
-->
1209
1209
1210
- * ` value ` {String | Buffer | Integer} What to search for
1210
+ * ` value ` {string | Buffer | Integer} What to search for
1211
1211
* ` byteOffset ` {Integer} Where to begin searching in ` buf ` . ** Default:** ` 0 `
1212
- * ` encoding ` {String } If ` value ` is a string, this is its encoding.
1212
+ * ` encoding ` {string } If ` value ` is a string, this is its encoding.
1213
1213
** Default:** ` 'utf8' `
1214
1214
* Returns: {Boolean} ` true ` if ` value ` was found in ` buf ` , ` false ` otherwise
1215
1215
@@ -1256,9 +1256,9 @@ changes:
1256
1256
is no longer required.
1257
1257
-->
1258
1258
1259
- * ` value ` {String | Buffer | Uint8Array | Integer} What to search for
1259
+ * ` value ` {string | Buffer | Uint8Array | Integer} What to search for
1260
1260
* ` byteOffset ` {Integer} Where to begin searching in ` buf ` . ** Default:** ` 0 `
1261
- * ` encoding ` {String } If ` value ` is a string, this is its encoding.
1261
+ * ` encoding ` {string } If ` value ` is a string, this is its encoding.
1262
1262
** Default:** ` 'utf8' `
1263
1263
* Returns: {Integer} The index of the first occurrence of ` value ` in ` buf ` or ` -1 `
1264
1264
if ` buf ` does not contain ` value `
@@ -1365,10 +1365,10 @@ changes:
1365
1365
description: The `value` can now be a `Uint8Array`.
1366
1366
-->
1367
1367
1368
- * ` value ` {String | Buffer | Uint8Array | Integer} What to search for
1368
+ * ` value ` {string | Buffer | Uint8Array | Integer} What to search for
1369
1369
* ` byteOffset ` {Integer} Where to begin searching in ` buf ` .
1370
1370
** Default:** [ ` buf.length ` ] ` - 1 `
1371
- * ` encoding ` {String } If ` value ` is a string, this is its encoding.
1371
+ * ` encoding ` {string } If ` value ` is a string, this is its encoding.
1372
1372
** Default:** ` 'utf8' `
1373
1373
* Returns: {Integer} The index of the last occurrence of ` value ` in ` buf ` or ` -1 `
1374
1374
if ` buf ` does not contain ` value `
@@ -1501,7 +1501,7 @@ added: v0.11.15
1501
1501
-->
1502
1502
1503
1503
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 8 `
1504
- * ` noAssert ` {Boolean } Skip ` offset ` validation? ** Default:** ` false `
1504
+ * ` noAssert ` {boolean } Skip ` offset ` validation? ** Default:** ` false `
1505
1505
* Returns: {Number}
1506
1506
1507
1507
Reads a 64-bit double from ` buf ` at the specified ` offset ` with specified
@@ -1537,7 +1537,7 @@ added: v0.11.15
1537
1537
-->
1538
1538
1539
1539
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 4 `
1540
- * ` noAssert ` {Boolean } Skip ` offset ` validation? ** Default:** ` false `
1540
+ * ` noAssert ` {boolean } Skip ` offset ` validation? ** Default:** ` false `
1541
1541
* Returns: {Number}
1542
1542
1543
1543
Reads a 32-bit float from ` buf ` at the specified ` offset ` with specified
@@ -1572,7 +1572,7 @@ added: v0.5.0
1572
1572
-->
1573
1573
1574
1574
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 1 `
1575
- * ` noAssert ` {Boolean } Skip ` offset ` validation? ** Default:** ` false `
1575
+ * ` noAssert ` {boolean } Skip ` offset ` validation? ** Default:** ` false `
1576
1576
* Returns: {Integer}
1577
1577
1578
1578
Reads a signed 8-bit integer from ` buf ` at the specified ` offset ` .
@@ -1604,7 +1604,7 @@ added: v0.5.5
1604
1604
-->
1605
1605
1606
1606
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 2 `
1607
- * ` noAssert ` {Boolean } Skip ` offset ` validation? ** Default:** ` false `
1607
+ * ` noAssert ` {boolean } Skip ` offset ` validation? ** Default:** ` false `
1608
1608
* Returns: {Integer}
1609
1609
1610
1610
Reads a signed 16-bit integer from ` buf ` at the specified ` offset ` with
@@ -1638,7 +1638,7 @@ added: v0.5.5
1638
1638
-->
1639
1639
1640
1640
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 4 `
1641
- * ` noAssert ` {Boolean } Skip ` offset ` validation? ** Default:** ` false `
1641
+ * ` noAssert ` {boolean } Skip ` offset ` validation? ** Default:** ` false `
1642
1642
* Returns: {Integer}
1643
1643
1644
1644
Reads a signed 32-bit integer from ` buf ` at the specified ` offset ` with
@@ -1673,7 +1673,7 @@ added: v0.11.15
1673
1673
1674
1674
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - byteLength `
1675
1675
* ` byteLength ` {Integer} How many bytes to read. Must satisfy: ` 0 < byteLength <= 6 `
1676
- * ` noAssert ` {Boolean } Skip ` offset ` and ` byteLength ` validation? ** Default:** ` false `
1676
+ * ` noAssert ` {boolean } Skip ` offset ` and ` byteLength ` validation? ** Default:** ` false `
1677
1677
* Returns: {Integer}
1678
1678
1679
1679
Reads ` byteLength ` number of bytes from ` buf ` at the specified ` offset `
@@ -1704,7 +1704,7 @@ added: v0.5.0
1704
1704
-->
1705
1705
1706
1706
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 1 `
1707
- * ` noAssert ` {Boolean } Skip ` offset ` validation? ** Default:** ` false `
1707
+ * ` noAssert ` {boolean } Skip ` offset ` validation? ** Default:** ` false `
1708
1708
* Returns: {Integer}
1709
1709
1710
1710
Reads an unsigned 8-bit integer from ` buf ` at the specified ` offset ` .
@@ -1734,7 +1734,7 @@ added: v0.5.5
1734
1734
-->
1735
1735
1736
1736
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 2 `
1737
- * ` noAssert ` {Boolean } Skip ` offset ` validation? ** Default:** ` false `
1737
+ * ` noAssert ` {boolean } Skip ` offset ` validation? ** Default:** ` false `
1738
1738
* Returns: {Integer}
1739
1739
1740
1740
Reads an unsigned 16-bit integer from ` buf ` at the specified ` offset ` with
@@ -1772,7 +1772,7 @@ added: v0.5.5
1772
1772
-->
1773
1773
1774
1774
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 4 `
1775
- * ` noAssert ` {Boolean } Skip ` offset ` validation? ** Default:** ` false `
1775
+ * ` noAssert ` {boolean } Skip ` offset ` validation? ** Default:** ` false `
1776
1776
* Returns: {Integer}
1777
1777
1778
1778
Reads an unsigned 32-bit integer from ` buf ` at the specified ` offset ` with
@@ -1805,7 +1805,7 @@ added: v0.11.15
1805
1805
1806
1806
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - byteLength `
1807
1807
* ` byteLength ` {Integer} How many bytes to read. Must satisfy: ` 0 < byteLength <= 6 `
1808
- * ` noAssert ` {Boolean } Skip ` offset ` and ` byteLength ` validation? ** Default:** ` false `
1808
+ * ` noAssert ` {boolean } Skip ` offset ` and ` byteLength ` validation? ** Default:** ` false `
1809
1809
* Returns: {Integer}
1810
1810
1811
1811
Reads ` byteLength ` number of bytes from ` buf ` at the specified ` offset `
@@ -2025,7 +2025,7 @@ console.log(copy);
2025
2025
added: v0.1.90
2026
2026
-->
2027
2027
2028
- * ` encoding ` {String } The character encoding to decode to. ** Default:** ` 'utf8' `
2028
+ * ` encoding ` {string } The character encoding to decode to. ** Default:** ` 'utf8' `
2029
2029
* ` start ` {Integer} The byte offset to start decoding at. ** Default:** ` 0 `
2030
2030
* ` end ` {Integer} The byte offset to stop decoding at (not inclusive).
2031
2031
** Default:** [ ` buf.length ` ]
@@ -2106,10 +2106,10 @@ for (const value of buf) {
2106
2106
added: v0.1.90
2107
2107
-->
2108
2108
2109
- * ` string ` {String } String to be written to ` buf `
2109
+ * ` string ` {string } String to be written to ` buf `
2110
2110
* ` offset ` {Integer} Where to start writing ` string ` . ** Default:** ` 0 `
2111
2111
* ` length ` {Integer} How many bytes to write. ** Default:** ` buf.length - offset `
2112
- * ` encoding ` {String } The character encoding of ` string ` . ** Default:** ` 'utf8' `
2112
+ * ` encoding ` {string } The character encoding of ` string ` . ** Default:** ` 'utf8' `
2113
2113
* Returns: {Integer} Number of bytes written
2114
2114
2115
2115
Writes ` string ` to ` buf ` at ` offset ` according to the character encoding in ` encoding ` .
@@ -2134,9 +2134,9 @@ console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);
2134
2134
added: v0.11.15
2135
2135
-->
2136
2136
2137
- * ` value ` {Number } Number to be written to ` buf `
2137
+ * ` value ` {number } Number to be written to ` buf `
2138
2138
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 8 `
2139
- * ` noAssert ` {Boolean } Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2139
+ * ` noAssert ` {boolean } Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2140
2140
* Returns: {Integer} ` offset ` plus the number of bytes written
2141
2141
2142
2142
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
@@ -2169,9 +2169,9 @@ console.log(buf);
2169
2169
added: v0.11.15
2170
2170
-->
2171
2171
2172
- * ` value ` {Number } Number to be written to ` buf `
2172
+ * ` value ` {number } Number to be written to ` buf `
2173
2173
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 4 `
2174
- * ` noAssert ` {Boolean } Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2174
+ * ` noAssert ` {boolean } Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2175
2175
* Returns: {Integer} ` offset ` plus the number of bytes written
2176
2176
2177
2177
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
@@ -2205,7 +2205,7 @@ added: v0.5.0
2205
2205
2206
2206
* ` value ` {Integer} Number to be written to ` buf `
2207
2207
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 1 `
2208
- * ` noAssert ` {Boolean } Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2208
+ * ` noAssert ` {boolean } Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2209
2209
* Returns: {Integer} ` offset ` plus the number of bytes written
2210
2210
2211
2211
Writes ` value ` to ` buf ` at the specified ` offset ` . ` value ` * should* be a valid
@@ -2237,7 +2237,7 @@ added: v0.5.5
2237
2237
2238
2238
* ` value ` {Integer} Number to be written to ` buf `
2239
2239
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 2 `
2240
- * ` noAssert ` {Boolean } Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2240
+ * ` noAssert ` {boolean } Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2241
2241
* Returns: {Integer} ` offset ` plus the number of bytes written
2242
2242
2243
2243
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
@@ -2270,7 +2270,7 @@ added: v0.5.5
2270
2270
2271
2271
* ` value ` {Integer} Number to be written to ` buf `
2272
2272
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 4 `
2273
- * ` noAssert ` {Boolean } Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2273
+ * ` noAssert ` {boolean } Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2274
2274
* Returns: {Integer} ` offset ` plus the number of bytes written
2275
2275
2276
2276
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
@@ -2304,7 +2304,7 @@ added: v0.11.15
2304
2304
* ` value ` {Integer} Number to be written to ` buf `
2305
2305
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - byteLength `
2306
2306
* ` byteLength ` {Integer} How many bytes to write. Must satisfy: ` 0 < byteLength <= 6 `
2307
- * ` noAssert ` {Boolean } Skip ` value ` , ` offset ` , and ` byteLength ` validation?
2307
+ * ` noAssert ` {boolean } Skip ` value ` , ` offset ` , and ` byteLength ` validation?
2308
2308
** Default:** ` false `
2309
2309
* Returns: {Integer} ` offset ` plus the number of bytes written
2310
2310
@@ -2338,7 +2338,7 @@ added: v0.5.0
2338
2338
2339
2339
* ` value ` {Integer} Number to be written to ` buf `
2340
2340
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 1 `
2341
- * ` noAssert ` {Boolean } Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2341
+ * ` noAssert ` {boolean } Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2342
2342
* Returns: {Integer} ` offset ` plus the number of bytes written
2343
2343
2344
2344
Writes ` value ` to ` buf ` at the specified ` offset ` . ` value ` * should* be a
@@ -2370,7 +2370,7 @@ added: v0.5.5
2370
2370
2371
2371
* ` value ` {Integer} Number to be written to ` buf `
2372
2372
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 2 `
2373
- * ` noAssert ` {Boolean } Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2373
+ * ` noAssert ` {boolean } Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2374
2374
* Returns: {Integer} ` offset ` plus the number of bytes written
2375
2375
2376
2376
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
@@ -2407,7 +2407,7 @@ added: v0.5.5
2407
2407
2408
2408
* ` value ` {Integer} Number to be written to ` buf `
2409
2409
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 4 `
2410
- * ` noAssert ` {Boolean } Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2410
+ * ` noAssert ` {boolean } Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2411
2411
* Returns: {Integer} ` offset ` plus the number of bytes written
2412
2412
2413
2413
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
@@ -2443,7 +2443,7 @@ added: v0.5.5
2443
2443
* ` value ` {Integer} Number to be written to ` buf `
2444
2444
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - byteLength `
2445
2445
* ` byteLength ` {Integer} How many bytes to write. Must satisfy: ` 0 < byteLength <= 6 `
2446
- * ` noAssert ` {Boolean } Skip ` value ` , ` offset ` , and ` byteLength ` validation?
2446
+ * ` noAssert ` {boolean } Skip ` value ` , ` offset ` , and ` byteLength ` validation?
2447
2447
** Default:** ` false `
2448
2448
* Returns: {Integer} ` offset ` plus the number of bytes written
2449
2449
@@ -2507,8 +2507,8 @@ changes:
2507
2507
-->
2508
2508
2509
2509
* ` source ` {Buffer|Uint8Array} A ` Buffer ` or ` Uint8Array ` instance
2510
- * ` fromEnc ` {String } The current encoding
2511
- * ` toEnc ` {String } To target encoding
2510
+ * ` fromEnc ` {string } The current encoding
2511
+ * ` toEnc ` {string } To target encoding
2512
2512
2513
2513
Re-encodes the given ` Buffer ` or ` Uint8Array ` instance from one character
2514
2514
encoding to another. Returns a new ` Buffer ` instance.
0 commit comments