@@ -612,7 +612,7 @@ added: v0.1.90
612
612
calculate the length of
613
613
* ` encoding ` {String} If ` string ` is a string, this is its encoding.
614
614
** Default:** ` 'utf8' `
615
- * Return : {Integer} The number of bytes contained within ` string `
615
+ * Returns : {Integer} The number of bytes contained within ` string `
616
616
617
617
Returns the actual byte length of a string. This is not the same as
618
618
[ ` String.prototype.length ` ] since that returns the number of * characters* in
@@ -638,7 +638,7 @@ added: v0.11.13
638
638
639
639
* ` buf1 ` {Buffer}
640
640
* ` buf2 ` {Buffer}
641
- * Return : {Integer}
641
+ * Returns : {Integer}
642
642
643
643
Compares ` buf1 ` to ` buf2 ` typically for the purpose of sorting arrays of
644
644
` Buffer ` instances. This is equivalent to calling
@@ -664,7 +664,7 @@ added: v0.7.11
664
664
* ` list ` {Array} List of ` Buffer ` instances to concat
665
665
* ` totalLength ` {Integer} Total length of the ` Buffer ` instances in ` list `
666
666
when concatenated
667
- * Return : {Buffer}
667
+ * Returns : {Buffer}
668
668
669
669
Returns a new ` Buffer ` which is the result of concatenating all the ` Buffer `
670
670
instances in the ` list ` together.
@@ -829,7 +829,7 @@ added: v0.1.101
829
829
-->
830
830
831
831
* ` obj ` {Object}
832
- * Return : {Boolean}
832
+ * Returns : {Boolean}
833
833
834
834
Returns ` true ` if ` obj ` is a ` Buffer ` , ` false ` otherwise.
835
835
@@ -839,7 +839,7 @@ added: v0.9.1
839
839
-->
840
840
841
841
* ` encoding ` {String} A character encoding name to check
842
- * Return : {Boolean}
842
+ * Returns : {Boolean}
843
843
844
844
Returns ` true ` if ` encoding ` contains a supported character encoding, or ` false `
845
845
otherwise.
@@ -894,7 +894,7 @@ added: v0.11.13
894
894
* ` sourceEnd ` {Integer} The offset within ` buf ` at which to end comparison
895
895
(not inclusive). Ignored when ` targetStart ` is ` undefined ` .
896
896
** Default:** [ ` buf.length ` ]
897
- * Return : {Integer}
897
+ * Returns : {Integer}
898
898
899
899
Compares ` buf ` with ` target ` and returns a number indicating whether ` buf `
900
900
comes before, after, or is the same as ` target ` in sort order.
@@ -966,7 +966,7 @@ added: v0.1.90
966
966
Ignored when ` targetStart ` is ` undefined ` . ** Default:** ` 0 `
967
967
* ` sourceEnd ` {Integer} The offset within ` buf ` at which to stop copying (not
968
968
inclusive). Ignored when ` sourceStart ` is ` undefined ` . ** Default:** [ ` buf.length ` ]
969
- * Return : {Integer} The number of bytes copied.
969
+ * Returns : {Integer} The number of bytes copied.
970
970
971
971
Copies data from a region of ` buf ` to a region in ` target ` even if the ` target `
972
972
memory region overlaps with ` buf ` .
@@ -1011,7 +1011,7 @@ console.log(buf.toString());
1011
1011
added: v1.1.0
1012
1012
-->
1013
1013
1014
- * Return : {Iterator}
1014
+ * Returns : {Iterator}
1015
1015
1016
1016
Creates and returns an [ iterator] of ` [index, byte] ` pairs from the contents of
1017
1017
` buf ` .
@@ -1039,7 +1039,7 @@ added: v0.11.13
1039
1039
-->
1040
1040
1041
1041
* ` otherBuffer ` {Buffer} A ` Buffer ` to compare to
1042
- * Return : {Boolean}
1042
+ * Returns : {Boolean}
1043
1043
1044
1044
Returns ` true ` if both ` buf ` and ` otherBuffer ` have exactly the same bytes,
1045
1045
` false ` otherwise.
@@ -1068,7 +1068,7 @@ added: v0.5.0
1068
1068
* ` end ` {Integer} Where to stop filling ` buf ` (not inclusive). ** Default:** [ ` buf.length ` ]
1069
1069
* ` encoding ` {String} If ` value ` is a string, this is its encoding.
1070
1070
** Default:** ` 'utf8' `
1071
- * Return : {Buffer} A reference to ` buf `
1071
+ * Returns : {Buffer} A reference to ` buf `
1072
1072
1073
1073
Fills ` buf ` with the specified ` value ` . If the ` offset ` and ` end ` are not given,
1074
1074
the entire ` buf ` will be filled. This is meant to be a small simplification to
@@ -1104,7 +1104,7 @@ added: v1.5.0
1104
1104
* ` byteOffset ` {Integer} Where to begin searching in ` buf ` . ** Default:** ` 0 `
1105
1105
* ` encoding ` {String} If ` value ` is a string, this is its encoding.
1106
1106
** Default:** ` 'utf8' `
1107
- * Return : {Integer} The index of the first occurrence of ` value ` in ` buf ` or ` -1 `
1107
+ * Returns : {Integer} The index of the first occurrence of ` value ` in ` buf ` or ` -1 `
1108
1108
if ` buf ` does not contain ` value `
1109
1109
1110
1110
If ` value ` is:
@@ -1159,7 +1159,7 @@ added: v5.3.0
1159
1159
* ` byteOffset ` {Integer} Where to begin searching in ` buf ` . ** Default:** ` 0 `
1160
1160
* ` encoding ` {String} If ` value ` is a string, this is its encoding.
1161
1161
** Default:** ` 'utf8' `
1162
- * Return : {Boolean} ` true ` if ` value ` was found in ` buf ` , ` false ` otherwise
1162
+ * Returns : {Boolean} ` true ` if ` value ` was found in ` buf ` , ` false ` otherwise
1163
1163
1164
1164
Equivalent to [ ` buf.indexOf() !== -1 ` ] [ `buf.indexOf()` ] .
1165
1165
@@ -1196,7 +1196,7 @@ console.log(buf.includes('this', 4));
1196
1196
added: v1.1.0
1197
1197
-->
1198
1198
1199
- * Return : {Iterator}
1199
+ * Returns : {Iterator}
1200
1200
1201
1201
Creates and returns an [ iterator] of ` buf ` keys (indices).
1202
1202
@@ -1227,7 +1227,7 @@ added: v6.0.0
1227
1227
** Default:** [ ` buf.length ` ]
1228
1228
* ` encoding ` {String} If ` value ` is a string, this is its encoding.
1229
1229
** Default:** ` 'utf8' `
1230
- * Return : {Integer} The index of the last occurrence of ` value ` in ` buf ` or ` -1 `
1230
+ * Returns : {Integer} The index of the last occurrence of ` value ` in ` buf ` or ` -1 `
1231
1231
if ` buf ` does not contain ` value `
1232
1232
1233
1233
Identical to [ ` buf.indexOf() ` ] , except ` buf ` is searched from back to front
@@ -1323,7 +1323,7 @@ added: v0.11.15
1323
1323
1324
1324
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 8 `
1325
1325
* ` noAssert ` {Boolean} Skip ` offset ` validation? ** Default:** ` false `
1326
- * Return : {Number}
1326
+ * Returns : {Number}
1327
1327
1328
1328
Reads a 64-bit double from ` buf ` at the specified ` offset ` with specified
1329
1329
endian format (` readDoubleBE() ` returns big endian, ` readDoubleLE() ` returns
@@ -1359,7 +1359,7 @@ added: v0.11.15
1359
1359
1360
1360
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 4 `
1361
1361
* ` noAssert ` {Boolean} Skip ` offset ` validation? ** Default:** ` false `
1362
- * Return : {Number}
1362
+ * Returns : {Number}
1363
1363
1364
1364
Reads a 32-bit float from ` buf ` at the specified ` offset ` with specified
1365
1365
endian format (` readFloatBE() ` returns big endian, ` readFloatLE() ` returns
@@ -1394,7 +1394,7 @@ added: v0.5.0
1394
1394
1395
1395
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 1 `
1396
1396
* ` noAssert ` {Boolean} Skip ` offset ` validation? ** Default:** ` false `
1397
- * Return : {Integer}
1397
+ * Returns : {Integer}
1398
1398
1399
1399
Reads a signed 8-bit integer from ` buf ` at the specified ` offset ` .
1400
1400
@@ -1426,7 +1426,7 @@ added: v0.5.5
1426
1426
1427
1427
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 2 `
1428
1428
* ` noAssert ` {Boolean} Skip ` offset ` validation? ** Default:** ` false `
1429
- * Return : {Integer}
1429
+ * Returns : {Integer}
1430
1430
1431
1431
Reads a signed 16-bit integer from ` buf ` at the specified ` offset ` with
1432
1432
the specified endian format (` readInt16BE() ` returns big endian,
@@ -1460,7 +1460,7 @@ added: v0.5.5
1460
1460
1461
1461
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 4 `
1462
1462
* ` noAssert ` {Boolean} Skip ` offset ` validation? ** Default:** ` false `
1463
- * Return : {Integer}
1463
+ * Returns : {Integer}
1464
1464
1465
1465
Reads a signed 32-bit integer from ` buf ` at the specified ` offset ` with
1466
1466
the specified endian format (` readInt32BE() ` returns big endian,
@@ -1495,7 +1495,7 @@ added: v0.11.15
1495
1495
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - byteLength `
1496
1496
* ` byteLength ` {Integer} How many bytes to read. Must satisfy: ` 0 < byteLength <= 6 `
1497
1497
* ` noAssert ` {Boolean} Skip ` offset ` and ` byteLength ` validation? ** Default:** ` false `
1498
- * Return : {Integer}
1498
+ * Returns : {Integer}
1499
1499
1500
1500
Reads ` byteLength ` number of bytes from ` buf ` at the specified ` offset `
1501
1501
and interprets the result as a two's complement signed value. Supports up to 48
@@ -1526,7 +1526,7 @@ added: v0.5.0
1526
1526
1527
1527
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 1 `
1528
1528
* ` noAssert ` {Boolean} Skip ` offset ` validation? ** Default:** ` false `
1529
- * Return : {Integer}
1529
+ * Returns : {Integer}
1530
1530
1531
1531
Reads an unsigned 8-bit integer from ` buf ` at the specified ` offset ` .
1532
1532
@@ -1556,7 +1556,7 @@ added: v0.5.5
1556
1556
1557
1557
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 2 `
1558
1558
* ` noAssert ` {Boolean} Skip ` offset ` validation? ** Default:** ` false `
1559
- * Return : {Integer}
1559
+ * Returns : {Integer}
1560
1560
1561
1561
Reads an unsigned 16-bit integer from ` buf ` at the specified ` offset ` with
1562
1562
specified endian format (` readUInt16BE() ` returns big endian, ` readUInt16LE() `
@@ -1594,7 +1594,7 @@ added: v0.5.5
1594
1594
1595
1595
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 4 `
1596
1596
* ` noAssert ` {Boolean} Skip ` offset ` validation? ** Default:** ` false `
1597
- * Return : {Integer}
1597
+ * Returns : {Integer}
1598
1598
1599
1599
Reads an unsigned 32-bit integer from ` buf ` at the specified ` offset ` with
1600
1600
specified endian format (` readUInt32BE() ` returns big endian,
@@ -1627,7 +1627,7 @@ added: v0.11.15
1627
1627
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - byteLength `
1628
1628
* ` byteLength ` {Integer} How many bytes to read. Must satisfy: ` 0 < byteLength <= 6 `
1629
1629
* ` noAssert ` {Boolean} Skip ` offset ` and ` byteLength ` validation? ** Default:** ` false `
1630
- * Return : {Integer}
1630
+ * Returns : {Integer}
1631
1631
1632
1632
Reads ` byteLength ` number of bytes from ` buf ` at the specified ` offset `
1633
1633
and interprets the result as an unsigned integer. Supports up to 48
@@ -1659,7 +1659,7 @@ added: v0.3.0
1659
1659
* ` start ` {Integer} Where the new ` Buffer ` will start. ** Default:** ` 0 `
1660
1660
* ` end ` {Integer} Where the new ` Buffer ` will end (not inclusive).
1661
1661
** Default:** [ ` buf.length ` ]
1662
- * Return : {Buffer}
1662
+ * Returns : {Buffer}
1663
1663
1664
1664
Returns a new ` Buffer ` that references the same memory as the original, but
1665
1665
offset and cropped by the ` start ` and ` end ` indices.
@@ -1715,7 +1715,7 @@ console.log(buf.slice(-5, -2).toString());
1715
1715
added: v5.10.0
1716
1716
-->
1717
1717
1718
- * Return : {Buffer} A reference to ` buf `
1718
+ * Returns : {Buffer} A reference to ` buf `
1719
1719
1720
1720
Interprets ` buf ` as an array of unsigned 16-bit integers and swaps the byte-order
1721
1721
* in-place* . Throws a ` RangeError ` if [ ` buf.length ` ] is not a multiple of 2.
@@ -1745,7 +1745,7 @@ buf2.swap32();
1745
1745
added: v5.10.0
1746
1746
-->
1747
1747
1748
- * Return : {Buffer} A reference to ` buf `
1748
+ * Returns : {Buffer} A reference to ` buf `
1749
1749
1750
1750
Interprets ` buf ` as an array of unsigned 32-bit integers and swaps the byte-order
1751
1751
* in-place* . Throws a ` RangeError ` if [ ` buf.length ` ] is not a multiple of 4.
@@ -1775,7 +1775,7 @@ buf2.swap32();
1775
1775
added: v6.3.0
1776
1776
-->
1777
1777
1778
- * Return : {Buffer} A reference to ` buf `
1778
+ * Returns : {Buffer} A reference to ` buf `
1779
1779
1780
1780
Interprets ` buf ` as an array of 64-bit numbers and swaps the byte-order * in-place* .
1781
1781
Throws a ` RangeError ` if [ ` buf.length ` ] is not a multiple of 8.
@@ -1812,7 +1812,7 @@ added: v0.1.90
1812
1812
* ` start ` {Integer} The byte offset to start decoding at. ** Default:** ` 0 `
1813
1813
* ` end ` {Integer} The byte offset to stop decoding at (not inclusive).
1814
1814
** Default:** [ ` buf.length ` ]
1815
- * Return : {String}
1815
+ * Returns : {String}
1816
1816
1817
1817
Decodes ` buf ` to a string according to the specified character encoding in
1818
1818
` encoding ` . ` start ` and ` end ` may be passed to decode only a subset of ` buf ` .
@@ -1851,7 +1851,7 @@ console.log(buf2.toString(undefined, 0, 3));
1851
1851
added: v0.9.2
1852
1852
-->
1853
1853
1854
- * Return : {Object}
1854
+ * Returns : {Object}
1855
1855
1856
1856
Returns a JSON representation of ` buf ` . [ ` JSON.stringify() ` ] implicitly calls
1857
1857
this function when stringifying a ` Buffer ` instance.
@@ -1880,7 +1880,7 @@ console.log(copy);
1880
1880
added: v1.1.0
1881
1881
-->
1882
1882
1883
- * Return : {Iterator}
1883
+ * Returns : {Iterator}
1884
1884
1885
1885
Creates and returns an [ iterator] for ` buf ` values (bytes). This function is
1886
1886
called automatically when a ` Buffer ` is used in a ` for..of ` statement.
@@ -1922,7 +1922,7 @@ added: v0.1.90
1922
1922
* ` offset ` {Integer} Where to start writing ` string ` . ** Default:** ` 0 `
1923
1923
* ` length ` {Integer} How many bytes to write. ** Default:** ` buf.length - offset `
1924
1924
* ` encoding ` {String} The character encoding of ` string ` . ** Default:** ` 'utf8' `
1925
- * Return : {Integer} Number of bytes written
1925
+ * Returns : {Integer} Number of bytes written
1926
1926
1927
1927
Writes ` string ` to ` buf ` at ` offset ` according to the character encoding in ` encoding ` .
1928
1928
The ` length ` parameter is the number of bytes to write. If ` buf ` did not contain
@@ -1949,7 +1949,7 @@ added: v0.11.15
1949
1949
* ` value ` {Number} Number to be written to ` buf `
1950
1950
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 8 `
1951
1951
* ` noAssert ` {Boolean} Skip ` value ` and ` offset ` validation? ** Default:** ` false `
1952
- * Return : {Integer} ` offset ` plus the number of bytes written
1952
+ * Returns : {Integer} ` offset ` plus the number of bytes written
1953
1953
1954
1954
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
1955
1955
format (` writeDoubleBE() ` writes big endian, ` writeDoubleLE() ` writes little
@@ -1984,7 +1984,7 @@ added: v0.11.15
1984
1984
* ` value ` {Number} Number to be written to ` buf `
1985
1985
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 4 `
1986
1986
* ` noAssert ` {Boolean} Skip ` value ` and ` offset ` validation? ** Default:** ` false `
1987
- * Return : {Integer} ` offset ` plus the number of bytes written
1987
+ * Returns : {Integer} ` offset ` plus the number of bytes written
1988
1988
1989
1989
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
1990
1990
format (` writeFloatBE() ` writes big endian, ` writeFloatLE() ` writes little
@@ -2018,7 +2018,7 @@ added: v0.5.0
2018
2018
* ` value ` {Integer} Number to be written to ` buf `
2019
2019
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 1 `
2020
2020
* ` noAssert ` {Boolean} Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2021
- * Return : {Integer} ` offset ` plus the number of bytes written
2021
+ * Returns : {Integer} ` offset ` plus the number of bytes written
2022
2022
2023
2023
Writes ` value ` to ` buf ` at the specified ` offset ` . ` value ` * should* be a valid
2024
2024
signed 8-bit integer. Behavior is undefined when ` value ` is anything other than
@@ -2050,7 +2050,7 @@ added: v0.5.5
2050
2050
* ` value ` {Integer} Number to be written to ` buf `
2051
2051
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 2 `
2052
2052
* ` noAssert ` {Boolean} Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2053
- * Return : {Integer} ` offset ` plus the number of bytes written
2053
+ * Returns : {Integer} ` offset ` plus the number of bytes written
2054
2054
2055
2055
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
2056
2056
format (` writeInt16BE() ` writes big endian, ` writeInt16LE() ` writes little
@@ -2083,7 +2083,7 @@ added: v0.5.5
2083
2083
* ` value ` {Integer} Number to be written to ` buf `
2084
2084
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 4 `
2085
2085
* ` noAssert ` {Boolean} Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2086
- * Return : {Integer} ` offset ` plus the number of bytes written
2086
+ * Returns : {Integer} ` offset ` plus the number of bytes written
2087
2087
2088
2088
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
2089
2089
format (` writeInt32BE() ` writes big endian, ` writeInt32LE() ` writes little
@@ -2118,7 +2118,7 @@ added: v0.11.15
2118
2118
* ` byteLength ` {Integer} How many bytes to write. Must satisfy: ` 0 < byteLength <= 6 `
2119
2119
* ` noAssert ` {Boolean} Skip ` value ` , ` offset ` , and ` byteLength ` validation?
2120
2120
** Default:** ` false `
2121
- * Return : {Integer} ` offset ` plus the number of bytes written
2121
+ * Returns : {Integer} ` offset ` plus the number of bytes written
2122
2122
2123
2123
Writes ` byteLength ` bytes of ` value ` to ` buf ` at the specified ` offset ` .
2124
2124
Supports up to 48 bits of accuracy. Behavior is undefined when ` value ` is
@@ -2151,7 +2151,7 @@ added: v0.5.0
2151
2151
* ` value ` {Integer} Number to be written to ` buf `
2152
2152
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 1 `
2153
2153
* ` noAssert ` {Boolean} Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2154
- * Return : {Integer} ` offset ` plus the number of bytes written
2154
+ * Returns : {Integer} ` offset ` plus the number of bytes written
2155
2155
2156
2156
Writes ` value ` to ` buf ` at the specified ` offset ` . ` value ` * should* be a
2157
2157
valid unsigned 8-bit integer. Behavior is undefined when ` value ` is anything
@@ -2183,7 +2183,7 @@ added: v0.5.5
2183
2183
* ` value ` {Integer} Number to be written to ` buf `
2184
2184
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 2 `
2185
2185
* ` noAssert ` {Boolean} Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2186
- * Return : {Integer} ` offset ` plus the number of bytes written
2186
+ * Returns : {Integer} ` offset ` plus the number of bytes written
2187
2187
2188
2188
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
2189
2189
format (` writeUInt16BE() ` writes big endian, ` writeUInt16LE() ` writes little
@@ -2220,7 +2220,7 @@ added: v0.5.5
2220
2220
* ` value ` {Integer} Number to be written to ` buf `
2221
2221
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 4 `
2222
2222
* ` noAssert ` {Boolean} Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2223
- * Return : {Integer} ` offset ` plus the number of bytes written
2223
+ * Returns : {Integer} ` offset ` plus the number of bytes written
2224
2224
2225
2225
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
2226
2226
format (` writeUInt32BE() ` writes big endian, ` writeUInt32LE() ` writes little
@@ -2257,7 +2257,7 @@ added: v0.5.5
2257
2257
* ` byteLength ` {Integer} How many bytes to write. Must satisfy: ` 0 < byteLength <= 6 `
2258
2258
* ` noAssert ` {Boolean} Skip ` value ` , ` offset ` , and ` byteLength ` validation?
2259
2259
** Default:** ` false `
2260
- * Return : {Integer} ` offset ` plus the number of bytes written
2260
+ * Returns : {Integer} ` offset ` plus the number of bytes written
2261
2261
2262
2262
Writes ` byteLength ` bytes of ` value ` to ` buf ` at the specified ` offset ` .
2263
2263
Supports up to 48 bits of accuracy. Behavior is undefined when ` value ` is
0 commit comments