@@ -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
@@ -640,7 +640,7 @@ added: v0.11.13
640
640
641
641
* ` buf1 ` {Buffer}
642
642
* ` buf2 ` {Buffer}
643
- * Return : {Integer}
643
+ * Returns : {Integer}
644
644
645
645
Compares ` buf1 ` to ` buf2 ` typically for the purpose of sorting arrays of
646
646
` Buffer ` instances. This is equivalent to calling
@@ -666,7 +666,7 @@ added: v0.7.11
666
666
* ` list ` {Array} List of ` Buffer ` instances to concat
667
667
* ` totalLength ` {Integer} Total length of the ` Buffer ` instances in ` list `
668
668
when concatenated
669
- * Return : {Buffer}
669
+ * Returns : {Buffer}
670
670
671
671
Returns a new ` Buffer ` which is the result of concatenating all the ` Buffer `
672
672
instances in the ` list ` together.
@@ -831,7 +831,7 @@ added: v0.1.101
831
831
-->
832
832
833
833
* ` obj ` {Object}
834
- * Return : {Boolean}
834
+ * Returns : {Boolean}
835
835
836
836
Returns ` true ` if ` obj ` is a ` Buffer ` , ` false ` otherwise.
837
837
@@ -841,7 +841,7 @@ added: v0.9.1
841
841
-->
842
842
843
843
* ` encoding ` {String} A character encoding name to check
844
- * Return : {Boolean}
844
+ * Returns : {Boolean}
845
845
846
846
Returns ` true ` if ` encoding ` contains a supported character encoding, or ` false `
847
847
otherwise.
@@ -896,7 +896,7 @@ added: v0.11.13
896
896
* ` sourceEnd ` {Integer} The offset within ` buf ` at which to end comparison
897
897
(not inclusive). Ignored when ` targetStart ` is ` undefined ` .
898
898
** Default:** [ ` buf.length ` ]
899
- * Return : {Integer}
899
+ * Returns : {Integer}
900
900
901
901
Compares ` buf ` with ` target ` and returns a number indicating whether ` buf `
902
902
comes before, after, or is the same as ` target ` in sort order.
@@ -968,7 +968,7 @@ added: v0.1.90
968
968
Ignored when ` targetStart ` is ` undefined ` . ** Default:** ` 0 `
969
969
* ` sourceEnd ` {Integer} The offset within ` buf ` at which to stop copying (not
970
970
inclusive). Ignored when ` sourceStart ` is ` undefined ` . ** Default:** [ ` buf.length ` ]
971
- * Return : {Integer} The number of bytes copied.
971
+ * Returns : {Integer} The number of bytes copied.
972
972
973
973
Copies data from a region of ` buf ` to a region in ` target ` even if the ` target `
974
974
memory region overlaps with ` buf ` .
@@ -1013,7 +1013,7 @@ console.log(buf.toString());
1013
1013
added: v1.1.0
1014
1014
-->
1015
1015
1016
- * Return : {Iterator}
1016
+ * Returns : {Iterator}
1017
1017
1018
1018
Creates and returns an [ iterator] of ` [index, byte] ` pairs from the contents of
1019
1019
` buf ` .
@@ -1041,7 +1041,7 @@ added: v0.11.13
1041
1041
-->
1042
1042
1043
1043
* ` otherBuffer ` {Buffer} A ` Buffer ` to compare to
1044
- * Return : {Boolean}
1044
+ * Returns : {Boolean}
1045
1045
1046
1046
Returns ` true ` if both ` buf ` and ` otherBuffer ` have exactly the same bytes,
1047
1047
` false ` otherwise.
@@ -1070,7 +1070,7 @@ added: v0.5.0
1070
1070
* ` end ` {Integer} Where to stop filling ` buf ` (not inclusive). ** Default:** [ ` buf.length ` ]
1071
1071
* ` encoding ` {String} If ` value ` is a string, this is its encoding.
1072
1072
** Default:** ` 'utf8' `
1073
- * Return : {Buffer} A reference to ` buf `
1073
+ * Returns : {Buffer} A reference to ` buf `
1074
1074
1075
1075
Fills ` buf ` with the specified ` value ` . If the ` offset ` and ` end ` are not given,
1076
1076
the entire ` buf ` will be filled. This is meant to be a small simplification to
@@ -1106,7 +1106,7 @@ added: v1.5.0
1106
1106
* ` byteOffset ` {Integer} Where to begin searching in ` buf ` . ** Default:** ` 0 `
1107
1107
* ` encoding ` {String} If ` value ` is a string, this is its encoding.
1108
1108
** Default:** ` 'utf8' `
1109
- * Return : {Integer} The index of the first occurrence of ` value ` in ` buf ` or ` -1 `
1109
+ * Returns : {Integer} The index of the first occurrence of ` value ` in ` buf ` or ` -1 `
1110
1110
if ` buf ` does not contain ` value `
1111
1111
1112
1112
If ` value ` is:
@@ -1161,7 +1161,7 @@ added: v5.3.0
1161
1161
* ` byteOffset ` {Integer} Where to begin searching in ` buf ` . ** Default:** ` 0 `
1162
1162
* ` encoding ` {String} If ` value ` is a string, this is its encoding.
1163
1163
** Default:** ` 'utf8' `
1164
- * Return : {Boolean} ` true ` if ` value ` was found in ` buf ` , ` false ` otherwise
1164
+ * Returns : {Boolean} ` true ` if ` value ` was found in ` buf ` , ` false ` otherwise
1165
1165
1166
1166
Equivalent to [ ` buf.indexOf() !== -1 ` ] [ `buf.indexOf()` ] .
1167
1167
@@ -1198,7 +1198,7 @@ console.log(buf.includes('this', 4));
1198
1198
added: v1.1.0
1199
1199
-->
1200
1200
1201
- * Return : {Iterator}
1201
+ * Returns : {Iterator}
1202
1202
1203
1203
Creates and returns an [ iterator] of ` buf ` keys (indices).
1204
1204
@@ -1229,7 +1229,7 @@ added: v6.0.0
1229
1229
** Default:** [ ` buf.length ` ]
1230
1230
* ` encoding ` {String} If ` value ` is a string, this is its encoding.
1231
1231
** Default:** ` 'utf8' `
1232
- * Return : {Integer} The index of the last occurrence of ` value ` in ` buf ` or ` -1 `
1232
+ * Returns : {Integer} The index of the last occurrence of ` value ` in ` buf ` or ` -1 `
1233
1233
if ` buf ` does not contain ` value `
1234
1234
1235
1235
Identical to [ ` buf.indexOf() ` ] , except ` buf ` is searched from back to front
@@ -1325,7 +1325,7 @@ added: v0.11.15
1325
1325
1326
1326
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 8 `
1327
1327
* ` noAssert ` {Boolean} Skip ` offset ` validation? ** Default:** ` false `
1328
- * Return : {Number}
1328
+ * Returns : {Number}
1329
1329
1330
1330
Reads a 64-bit double from ` buf ` at the specified ` offset ` with specified
1331
1331
endian format (` readDoubleBE() ` returns big endian, ` readDoubleLE() ` returns
@@ -1361,7 +1361,7 @@ added: v0.11.15
1361
1361
1362
1362
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 4 `
1363
1363
* ` noAssert ` {Boolean} Skip ` offset ` validation? ** Default:** ` false `
1364
- * Return : {Number}
1364
+ * Returns : {Number}
1365
1365
1366
1366
Reads a 32-bit float from ` buf ` at the specified ` offset ` with specified
1367
1367
endian format (` readFloatBE() ` returns big endian, ` readFloatLE() ` returns
@@ -1396,7 +1396,7 @@ added: v0.5.0
1396
1396
1397
1397
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 1 `
1398
1398
* ` noAssert ` {Boolean} Skip ` offset ` validation? ** Default:** ` false `
1399
- * Return : {Integer}
1399
+ * Returns : {Integer}
1400
1400
1401
1401
Reads a signed 8-bit integer from ` buf ` at the specified ` offset ` .
1402
1402
@@ -1428,7 +1428,7 @@ added: v0.5.5
1428
1428
1429
1429
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 2 `
1430
1430
* ` noAssert ` {Boolean} Skip ` offset ` validation? ** Default:** ` false `
1431
- * Return : {Integer}
1431
+ * Returns : {Integer}
1432
1432
1433
1433
Reads a signed 16-bit integer from ` buf ` at the specified ` offset ` with
1434
1434
the specified endian format (` readInt16BE() ` returns big endian,
@@ -1462,7 +1462,7 @@ added: v0.5.5
1462
1462
1463
1463
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 4 `
1464
1464
* ` noAssert ` {Boolean} Skip ` offset ` validation? ** Default:** ` false `
1465
- * Return : {Integer}
1465
+ * Returns : {Integer}
1466
1466
1467
1467
Reads a signed 32-bit integer from ` buf ` at the specified ` offset ` with
1468
1468
the specified endian format (` readInt32BE() ` returns big endian,
@@ -1497,7 +1497,7 @@ added: v0.11.15
1497
1497
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - byteLength `
1498
1498
* ` byteLength ` {Integer} How many bytes to read. Must satisfy: ` 0 < byteLength <= 6 `
1499
1499
* ` noAssert ` {Boolean} Skip ` offset ` and ` byteLength ` validation? ** Default:** ` false `
1500
- * Return : {Integer}
1500
+ * Returns : {Integer}
1501
1501
1502
1502
Reads ` byteLength ` number of bytes from ` buf ` at the specified ` offset `
1503
1503
and interprets the result as a two's complement signed value. Supports up to 48
@@ -1528,7 +1528,7 @@ added: v0.5.0
1528
1528
1529
1529
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 1 `
1530
1530
* ` noAssert ` {Boolean} Skip ` offset ` validation? ** Default:** ` false `
1531
- * Return : {Integer}
1531
+ * Returns : {Integer}
1532
1532
1533
1533
Reads an unsigned 8-bit integer from ` buf ` at the specified ` offset ` .
1534
1534
@@ -1558,7 +1558,7 @@ added: v0.5.5
1558
1558
1559
1559
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 2 `
1560
1560
* ` noAssert ` {Boolean} Skip ` offset ` validation? ** Default:** ` false `
1561
- * Return : {Integer}
1561
+ * Returns : {Integer}
1562
1562
1563
1563
Reads an unsigned 16-bit integer from ` buf ` at the specified ` offset ` with
1564
1564
specified endian format (` readUInt16BE() ` returns big endian, ` readUInt16LE() `
@@ -1596,7 +1596,7 @@ added: v0.5.5
1596
1596
1597
1597
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - 4 `
1598
1598
* ` noAssert ` {Boolean} Skip ` offset ` validation? ** Default:** ` false `
1599
- * Return : {Integer}
1599
+ * Returns : {Integer}
1600
1600
1601
1601
Reads an unsigned 32-bit integer from ` buf ` at the specified ` offset ` with
1602
1602
specified endian format (` readUInt32BE() ` returns big endian,
@@ -1629,7 +1629,7 @@ added: v0.11.15
1629
1629
* ` offset ` {Integer} Where to start reading. Must satisfy: ` 0 <= offset <= buf.length - byteLength `
1630
1630
* ` byteLength ` {Integer} How many bytes to read. Must satisfy: ` 0 < byteLength <= 6 `
1631
1631
* ` noAssert ` {Boolean} Skip ` offset ` and ` byteLength ` validation? ** Default:** ` false `
1632
- * Return : {Integer}
1632
+ * Returns : {Integer}
1633
1633
1634
1634
Reads ` byteLength ` number of bytes from ` buf ` at the specified ` offset `
1635
1635
and interprets the result as an unsigned integer. Supports up to 48
@@ -1661,7 +1661,7 @@ added: v0.3.0
1661
1661
* ` start ` {Integer} Where the new ` Buffer ` will start. ** Default:** ` 0 `
1662
1662
* ` end ` {Integer} Where the new ` Buffer ` will end (not inclusive).
1663
1663
** Default:** [ ` buf.length ` ]
1664
- * Return : {Buffer}
1664
+ * Returns : {Buffer}
1665
1665
1666
1666
Returns a new ` Buffer ` that references the same memory as the original, but
1667
1667
offset and cropped by the ` start ` and ` end ` indices.
@@ -1717,7 +1717,7 @@ console.log(buf.slice(-5, -2).toString());
1717
1717
added: v5.10.0
1718
1718
-->
1719
1719
1720
- * Return : {Buffer} A reference to ` buf `
1720
+ * Returns : {Buffer} A reference to ` buf `
1721
1721
1722
1722
Interprets ` buf ` as an array of unsigned 16-bit integers and swaps the byte-order
1723
1723
* in-place* . Throws a ` RangeError ` if [ ` buf.length ` ] is not a multiple of 2.
@@ -1747,7 +1747,7 @@ buf2.swap32();
1747
1747
added: v5.10.0
1748
1748
-->
1749
1749
1750
- * Return : {Buffer} A reference to ` buf `
1750
+ * Returns : {Buffer} A reference to ` buf `
1751
1751
1752
1752
Interprets ` buf ` as an array of unsigned 32-bit integers and swaps the byte-order
1753
1753
* in-place* . Throws a ` RangeError ` if [ ` buf.length ` ] is not a multiple of 4.
@@ -1777,7 +1777,7 @@ buf2.swap32();
1777
1777
added: v6.3.0
1778
1778
-->
1779
1779
1780
- * Return : {Buffer} A reference to ` buf `
1780
+ * Returns : {Buffer} A reference to ` buf `
1781
1781
1782
1782
Interprets ` buf ` as an array of 64-bit numbers and swaps the byte-order * in-place* .
1783
1783
Throws a ` RangeError ` if [ ` buf.length ` ] is not a multiple of 8.
@@ -1814,7 +1814,7 @@ added: v0.1.90
1814
1814
* ` start ` {Integer} The byte offset to start decoding at. ** Default:** ` 0 `
1815
1815
* ` end ` {Integer} The byte offset to stop decoding at (not inclusive).
1816
1816
** Default:** [ ` buf.length ` ]
1817
- * Return : {String}
1817
+ * Returns : {String}
1818
1818
1819
1819
Decodes ` buf ` to a string according to the specified character encoding in
1820
1820
` encoding ` . ` start ` and ` end ` may be passed to decode only a subset of ` buf ` .
@@ -1853,7 +1853,7 @@ console.log(buf2.toString(undefined, 0, 3));
1853
1853
added: v0.9.2
1854
1854
-->
1855
1855
1856
- * Return : {Object}
1856
+ * Returns : {Object}
1857
1857
1858
1858
Returns a JSON representation of ` buf ` . [ ` JSON.stringify() ` ] implicitly calls
1859
1859
this function when stringifying a ` Buffer ` instance.
@@ -1882,7 +1882,7 @@ console.log(copy);
1882
1882
added: v1.1.0
1883
1883
-->
1884
1884
1885
- * Return : {Iterator}
1885
+ * Returns : {Iterator}
1886
1886
1887
1887
Creates and returns an [ iterator] for ` buf ` values (bytes). This function is
1888
1888
called automatically when a ` Buffer ` is used in a ` for..of ` statement.
@@ -1924,7 +1924,7 @@ added: v0.1.90
1924
1924
* ` offset ` {Integer} Where to start writing ` string ` . ** Default:** ` 0 `
1925
1925
* ` length ` {Integer} How many bytes to write. ** Default:** ` buf.length - offset `
1926
1926
* ` encoding ` {String} The character encoding of ` string ` . ** Default:** ` 'utf8' `
1927
- * Return : {Integer} Number of bytes written
1927
+ * Returns : {Integer} Number of bytes written
1928
1928
1929
1929
Writes ` string ` to ` buf ` at ` offset ` according to the character encoding in ` encoding ` .
1930
1930
The ` length ` parameter is the number of bytes to write. If ` buf ` did not contain
@@ -1951,7 +1951,7 @@ added: v0.11.15
1951
1951
* ` value ` {Number} Number to be written to ` buf `
1952
1952
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 8 `
1953
1953
* ` noAssert ` {Boolean} Skip ` value ` and ` offset ` validation? ** Default:** ` false `
1954
- * Return : {Integer} ` offset ` plus the number of bytes written
1954
+ * Returns : {Integer} ` offset ` plus the number of bytes written
1955
1955
1956
1956
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
1957
1957
format (` writeDoubleBE() ` writes big endian, ` writeDoubleLE() ` writes little
@@ -1986,7 +1986,7 @@ added: v0.11.15
1986
1986
* ` value ` {Number} Number to be written to ` buf `
1987
1987
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 4 `
1988
1988
* ` noAssert ` {Boolean} Skip ` value ` and ` offset ` validation? ** Default:** ` false `
1989
- * Return : {Integer} ` offset ` plus the number of bytes written
1989
+ * Returns : {Integer} ` offset ` plus the number of bytes written
1990
1990
1991
1991
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
1992
1992
format (` writeFloatBE() ` writes big endian, ` writeFloatLE() ` writes little
@@ -2020,7 +2020,7 @@ added: v0.5.0
2020
2020
* ` value ` {Integer} Number to be written to ` buf `
2021
2021
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 1 `
2022
2022
* ` noAssert ` {Boolean} Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2023
- * Return : {Integer} ` offset ` plus the number of bytes written
2023
+ * Returns : {Integer} ` offset ` plus the number of bytes written
2024
2024
2025
2025
Writes ` value ` to ` buf ` at the specified ` offset ` . ` value ` * should* be a valid
2026
2026
signed 8-bit integer. Behavior is undefined when ` value ` is anything other than
@@ -2052,7 +2052,7 @@ added: v0.5.5
2052
2052
* ` value ` {Integer} Number to be written to ` buf `
2053
2053
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 2 `
2054
2054
* ` noAssert ` {Boolean} Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2055
- * Return : {Integer} ` offset ` plus the number of bytes written
2055
+ * Returns : {Integer} ` offset ` plus the number of bytes written
2056
2056
2057
2057
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
2058
2058
format (` writeInt16BE() ` writes big endian, ` writeInt16LE() ` writes little
@@ -2085,7 +2085,7 @@ added: v0.5.5
2085
2085
* ` value ` {Integer} Number to be written to ` buf `
2086
2086
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 4 `
2087
2087
* ` noAssert ` {Boolean} Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2088
- * Return : {Integer} ` offset ` plus the number of bytes written
2088
+ * Returns : {Integer} ` offset ` plus the number of bytes written
2089
2089
2090
2090
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
2091
2091
format (` writeInt32BE() ` writes big endian, ` writeInt32LE() ` writes little
@@ -2120,7 +2120,7 @@ added: v0.11.15
2120
2120
* ` byteLength ` {Integer} How many bytes to write. Must satisfy: ` 0 < byteLength <= 6 `
2121
2121
* ` noAssert ` {Boolean} Skip ` value ` , ` offset ` , and ` byteLength ` validation?
2122
2122
** Default:** ` false `
2123
- * Return : {Integer} ` offset ` plus the number of bytes written
2123
+ * Returns : {Integer} ` offset ` plus the number of bytes written
2124
2124
2125
2125
Writes ` byteLength ` bytes of ` value ` to ` buf ` at the specified ` offset ` .
2126
2126
Supports up to 48 bits of accuracy. Behavior is undefined when ` value ` is
@@ -2153,7 +2153,7 @@ added: v0.5.0
2153
2153
* ` value ` {Integer} Number to be written to ` buf `
2154
2154
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 1 `
2155
2155
* ` noAssert ` {Boolean} Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2156
- * Return : {Integer} ` offset ` plus the number of bytes written
2156
+ * Returns : {Integer} ` offset ` plus the number of bytes written
2157
2157
2158
2158
Writes ` value ` to ` buf ` at the specified ` offset ` . ` value ` * should* be a
2159
2159
valid unsigned 8-bit integer. Behavior is undefined when ` value ` is anything
@@ -2185,7 +2185,7 @@ added: v0.5.5
2185
2185
* ` value ` {Integer} Number to be written to ` buf `
2186
2186
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 2 `
2187
2187
* ` noAssert ` {Boolean} Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2188
- * Return : {Integer} ` offset ` plus the number of bytes written
2188
+ * Returns : {Integer} ` offset ` plus the number of bytes written
2189
2189
2190
2190
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
2191
2191
format (` writeUInt16BE() ` writes big endian, ` writeUInt16LE() ` writes little
@@ -2222,7 +2222,7 @@ added: v0.5.5
2222
2222
* ` value ` {Integer} Number to be written to ` buf `
2223
2223
* ` offset ` {Integer} Where to start writing. Must satisfy: ` 0 <= offset <= buf.length - 4 `
2224
2224
* ` noAssert ` {Boolean} Skip ` value ` and ` offset ` validation? ** Default:** ` false `
2225
- * Return : {Integer} ` offset ` plus the number of bytes written
2225
+ * Returns : {Integer} ` offset ` plus the number of bytes written
2226
2226
2227
2227
Writes ` value ` to ` buf ` at the specified ` offset ` with specified endian
2228
2228
format (` writeUInt32BE() ` writes big endian, ` writeUInt32LE() ` writes little
@@ -2259,7 +2259,7 @@ added: v0.5.5
2259
2259
* ` byteLength ` {Integer} How many bytes to write. Must satisfy: ` 0 < byteLength <= 6 `
2260
2260
* ` noAssert ` {Boolean} Skip ` value ` , ` offset ` , and ` byteLength ` validation?
2261
2261
** Default:** ` false `
2262
- * Return : {Integer} ` offset ` plus the number of bytes written
2262
+ * Returns : {Integer} ` offset ` plus the number of bytes written
2263
2263
2264
2264
Writes ` byteLength ` bytes of ` value ` to ` buf ` at the specified ` offset ` .
2265
2265
Supports up to 48 bits of accuracy. Behavior is undefined when ` value ` is
0 commit comments