@@ -704,6 +704,10 @@ actual byte length is returned.
704
704
### Class Method: Buffer.compare(buf1, buf2)
705
705
<!-- YAML
706
706
added: v0.11.13
707
+ changes:
708
+ - version: REPLACEME
709
+ pr-url: https://github.com/nodejs/node/pull/10236
710
+ description: The arguments can now be `Uint8Array`s.
707
711
-->
708
712
709
713
* ` buf1 ` {Buffer|Uint8Array}
@@ -729,6 +733,10 @@ console.log(arr.sort(Buffer.compare));
729
733
### Class Method: Buffer.concat(list[ , totalLength] )
730
734
<!-- YAML
731
735
added: v0.7.11
736
+ changes:
737
+ - version: REPLACEME
738
+ pr-url: https://github.com/nodejs/node/pull/10236
739
+ description: The elements of `list` can now be `Uint8Array`s.
732
740
-->
733
741
734
742
* ` list ` {Array} List of ` Buffer ` or [ ` Uint8Array ` ] instances to concat
@@ -966,6 +974,9 @@ console.log(buffer.buffer === arrayBuffer);
966
974
<!-- YAML
967
975
added: v0.11.13
968
976
changes:
977
+ - version: REPLACEME
978
+ pr-url: https://github.com/nodejs/node/pull/10236
979
+ description: The `target` parameter can now be a `Uint8Array`.
969
980
- version: v5.11.0
970
981
pr-url: https://github.com/nodejs/node/pull/5880
971
982
description: Additional parameters for specifying offsets are supported now.
@@ -1124,6 +1135,10 @@ for (const pair of buf.entries()) {
1124
1135
### buf.equals(otherBuffer)
1125
1136
<!-- YAML
1126
1137
added: v0.11.13
1138
+ changes:
1139
+ - version: REPLACEME
1140
+ pr-url: https://github.com/nodejs/node/pull/10236
1141
+ description: The arguments can now be `Uint8Array`s.
1127
1142
-->
1128
1143
1129
1144
* ` otherBuffer ` {Buffer} A ` Buffer ` or [ ` Uint8Array ` ] to compare to
@@ -1232,6 +1247,9 @@ console.log(buf.includes('this', 4));
1232
1247
<!-- YAML
1233
1248
added: v1.5.0
1234
1249
changes:
1250
+ - version: REPLACEME
1251
+ pr-url: https://github.com/nodejs/node/pull/10236
1252
+ description: The `value` can now be a `Uint8Array`.
1235
1253
- version: v5.7.0, v4.4.0
1236
1254
pr-url: https://github.com/nodejs/node/pull/4803
1237
1255
description: When `encoding` is being passed, the `byteOffset` parameter
@@ -1341,6 +1359,10 @@ for (const key of buf.keys()) {
1341
1359
### buf.lastIndexOf(value[ , byteOffset] [ , encoding ] )
1342
1360
<!-- YAML
1343
1361
added: v6.0.0
1362
+ changes:
1363
+ - version: REPLACEME
1364
+ pr-url: https://github.com/nodejs/node/pull/10236
1365
+ description: The `value` can now be a `Uint8Array`.
1344
1366
-->
1345
1367
1346
1368
* ` value ` {String | Buffer | Uint8Array | Integer} What to search for
@@ -1464,6 +1486,9 @@ console.log(buf.length);
1464
1486
```
1465
1487
1466
1488
### buf.parent
1489
+ <!-- YAML
1490
+ deprecated: REPLACEME
1491
+ -->
1467
1492
1468
1493
> Stability: 0 - Deprecated: Use [ ` buf.buffer ` ] instead.
1469
1494
@@ -2475,6 +2500,10 @@ Note that this is a property on the `buffer` module returned by
2475
2500
## buffer.transcode(source, fromEnc, toEnc)
2476
2501
<!-- YAML
2477
2502
added: v7.1.0
2503
+ changes:
2504
+ - version: REPLACEME
2505
+ pr-url: https://github.com/nodejs/node/pull/10236
2506
+ description: The `source` parameter can now be a `Uint8Array`.
2478
2507
-->
2479
2508
2480
2509
* ` source ` {Buffer|Uint8Array} A ` Buffer ` or ` Uint8Array ` instance
0 commit comments