@@ -1397,7 +1397,8 @@ console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);
1397
1397
1398
1398
Writes ` value ` to the Buffer at the specified ` offset ` with specified endian
1399
1399
format (` writeDoubleBE() ` writes big endian, ` writeDoubleLE() ` writes little
1400
- endian). The ` value ` argument must be a valid 64-bit double.
1400
+ endian). The ` value ` argument * should* be a valid 64-bit double. Behavior is
1401
+ unspecified if ` value ` is anything other than a 64-bit double.
1401
1402
1402
1403
Set ` noAssert ` to true to skip validation of ` value ` and ` offset ` . This means
1403
1404
that ` value ` may be too large for the specific function and ` offset ` may be
@@ -1459,8 +1460,9 @@ console.log(buf);
1459
1460
* ` noAssert ` {Boolean} Default: false
1460
1461
* Return: {Number} The offset plus the number of written bytes
1461
1462
1462
- Writes ` value ` to the Buffer at the specified ` offset ` . The ` value ` must be a
1463
- valid signed 8-bit integer.
1463
+ Writes ` value ` to the Buffer at the specified ` offset ` . The ` value ` should be a
1464
+ valid signed 8-bit integer. Behavior is unspecified if ` value ` is anything
1465
+ other than a signed 8-bit integer.
1464
1466
1465
1467
Set ` noAssert ` to true to skip validation of ` value ` and ` offset ` . This means
1466
1468
that ` value ` may be too large for the specific function and ` offset ` may be
@@ -1487,7 +1489,8 @@ console.log(buf);
1487
1489
1488
1490
Writes ` value ` to the Buffer at the specified ` offset ` with specified endian
1489
1491
format (` writeInt16BE() ` writes big endian, ` writeInt16LE() ` writes little
1490
- endian). The ` value ` must be a valid signed 16-bit integer.
1492
+ endian). The ` value ` should be a valid signed 16-bit integer. Behavior is
1493
+ unspecified if ` value ` is anything other than a signed 16-bit integer.
1491
1494
1492
1495
Set ` noAssert ` to true to skip validation of ` value ` and ` offset ` . This means
1493
1496
that ` value ` may be too large for the specific function and ` offset ` may be
@@ -1514,7 +1517,8 @@ console.log(buf);
1514
1517
1515
1518
Writes ` value ` to the Buffer at the specified ` offset ` with specified endian
1516
1519
format (` writeInt32BE() ` writes big endian, ` writeInt32LE() ` writes little
1517
- endian). The ` value ` must be a valid signed 32-bit integer.
1520
+ endian). The ` value ` should be a valid signed 32-bit integer. Behavior is
1521
+ unspecified if ` value ` is anything other than a signed 32-bit integer.
1518
1522
1519
1523
Set ` noAssert ` to true to skip validation of ` value ` and ` offset ` . This means
1520
1524
that ` value ` may be too large for the specific function and ` offset ` may be
@@ -1560,15 +1564,18 @@ that `value` may be too large for the specific function and `offset` may be
1560
1564
beyond the end of the Buffer leading to the values being silently dropped. This
1561
1565
should not be used unless you are certain of correctness.
1562
1566
1567
+ Behavior is unspecified if ` value ` is anything other than an integer.
1568
+
1563
1569
### buf.writeUInt8(value, offset[ , noAssert] )
1564
1570
1565
1571
* ` value ` {Number} Bytes to be written to Buffer
1566
1572
* ` offset ` {Number} ` 0 <= offset <= buf.length - 1 `
1567
1573
* ` noAssert ` {Boolean} Default: false
1568
1574
* Return: {Number} The offset plus the number of written bytes
1569
1575
1570
- Writes ` value ` to the Buffer at the specified ` offset ` . The ` value ` must be a
1571
- valid unsigned 8-bit integer.
1576
+ Writes ` value ` to the Buffer at the specified ` offset ` . The ` value ` should be a
1577
+ valid unsigned 8-bit integer. Behavior is unspecified if ` value ` is anything
1578
+ other than an unsigned 8-bit integer.
1572
1579
1573
1580
Set ` noAssert ` to true to skip validation of ` value ` and ` offset ` . This means
1574
1581
that ` value ` may be too large for the specific function and ` offset ` may be
@@ -1598,7 +1605,8 @@ console.log(buf);
1598
1605
1599
1606
Writes ` value ` to the Buffer at the specified ` offset ` with specified endian
1600
1607
format (` writeUInt16BE() ` writes big endian, ` writeUInt16LE() ` writes little
1601
- endian). The ` value ` must be a valid unsigned 16-bit integer.
1608
+ endian). The ` value ` should be a valid unsigned 16-bit integer. Behavior is
1609
+ unspecified if ` value ` is anything other than an unsigned 16-bit integer.
1602
1610
1603
1611
Set ` noAssert ` to true to skip validation of ` value ` and ` offset ` . This means
1604
1612
that ` value ` may be too large for the specific function and ` offset ` may be
@@ -1632,7 +1640,8 @@ console.log(buf);
1632
1640
1633
1641
Writes ` value ` to the Buffer at the specified ` offset ` with specified endian
1634
1642
format (` writeUInt32BE() ` writes big endian, ` writeUInt32LE() ` writes little
1635
- endian). The ` value ` must be a valid unsigned 32-bit integer.
1643
+ endian). The ` value ` should be a valid unsigned 32-bit integer. Behavior is
1644
+ unspecified if ` value ` is anything other than an unsigned 32-bit integer.
1636
1645
1637
1646
Set ` noAssert ` to true to skip validation of ` value ` and ` offset ` . This means
1638
1647
that ` value ` may be too large for the specific function and ` offset ` may be
@@ -1678,6 +1687,8 @@ that `value` may be too large for the specific function and `offset` may be
1678
1687
beyond the end of the Buffer leading to the values being silently dropped. This
1679
1688
should not be used unless you are certain of correctness.
1680
1689
1690
+ Behavior is unspecified if ` value ` is anything other than an unsigned integer.
1691
+
1681
1692
## buffer.INSPECT_MAX_BYTES
1682
1693
1683
1694
* {Number} Default: 50
0 commit comments