@@ -1384,7 +1384,8 @@ console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);
1384
1384
1385
1385
Writes ` value ` to the Buffer at the specified ` offset ` with specified endian
1386
1386
format (` writeDoubleBE() ` writes big endian, ` writeDoubleLE() ` writes little
1387
- endian). The ` value ` argument must be a valid 64-bit double.
1387
+ endian). The ` value ` argument * should* be a valid 64-bit double. Behavior is
1388
+ not defined when ` value ` is anything other than a 64-bit double.
1388
1389
1389
1390
Set ` noAssert ` to true to skip validation of ` value ` and ` offset ` . This means
1390
1391
that ` value ` may be too large for the specific function and ` offset ` may be
@@ -1416,7 +1417,7 @@ console.log(buf);
1416
1417
1417
1418
Writes ` value ` to the Buffer at the specified ` offset ` with specified endian
1418
1419
format (` writeFloatBE() ` writes big endian, ` writeFloatLE() ` writes little
1419
- endian). Behavior is unspecified if ` value ` is anything other than a 32-bit
1420
+ endian). Behavior is not defined when ` value ` is anything other than a 32-bit
1420
1421
float.
1421
1422
1422
1423
Set ` noAssert ` to true to skip validation of ` value ` and ` offset ` . This means
@@ -1446,8 +1447,9 @@ console.log(buf);
1446
1447
* ` noAssert ` {Boolean} Default: false
1447
1448
* Return: {Number} The offset plus the number of written bytes
1448
1449
1449
- Writes ` value ` to the Buffer at the specified ` offset ` . The ` value ` must be a
1450
- valid signed 8-bit integer.
1450
+ Writes ` value ` to the Buffer at the specified ` offset ` . The ` value ` should be a
1451
+ valid signed 8-bit integer. Behavior is not defined when ` value ` is anything
1452
+ other than a signed 8-bit integer.
1451
1453
1452
1454
Set ` noAssert ` to true to skip validation of ` value ` and ` offset ` . This means
1453
1455
that ` value ` may be too large for the specific function and ` offset ` may be
@@ -1474,7 +1476,8 @@ console.log(buf);
1474
1476
1475
1477
Writes ` value ` to the Buffer at the specified ` offset ` with specified endian
1476
1478
format (` writeInt16BE() ` writes big endian, ` writeInt16LE() ` writes little
1477
- endian). The ` value ` must be a valid signed 16-bit integer.
1479
+ endian). The ` value ` should be a valid signed 16-bit integer. Behavior is
1480
+ not defined when ` value ` is anything other than a signed 16-bit integer.
1478
1481
1479
1482
Set ` noAssert ` to true to skip validation of ` value ` and ` offset ` . This means
1480
1483
that ` value ` may be too large for the specific function and ` offset ` may be
@@ -1501,7 +1504,8 @@ console.log(buf);
1501
1504
1502
1505
Writes ` value ` to the Buffer at the specified ` offset ` with specified endian
1503
1506
format (` writeInt32BE() ` writes big endian, ` writeInt32LE() ` writes little
1504
- endian). The ` value ` must be a valid signed 32-bit integer.
1507
+ endian). The ` value ` should be a valid signed 32-bit integer. Behavior is
1508
+ not defined when ` value ` is anything other than a signed 32-bit integer.
1505
1509
1506
1510
Set ` noAssert ` to true to skip validation of ` value ` and ` offset ` . This means
1507
1511
that ` value ` may be too large for the specific function and ` offset ` may be
@@ -1547,15 +1551,18 @@ that `value` may be too large for the specific function and `offset` may be
1547
1551
beyond the end of the Buffer leading to the values being silently dropped. This
1548
1552
should not be used unless you are certain of correctness.
1549
1553
1554
+ Behavior is not defined when ` value ` is anything other than an integer.
1555
+
1550
1556
### buf.writeUInt8(value, offset[ , noAssert] )
1551
1557
1552
1558
* ` value ` {Number} Bytes to be written to Buffer
1553
1559
* ` offset ` {Number} ` 0 <= offset <= buf.length - 1 `
1554
1560
* ` noAssert ` {Boolean} Default: false
1555
1561
* Return: {Number} The offset plus the number of written bytes
1556
1562
1557
- Writes ` value ` to the Buffer at the specified ` offset ` . The ` value ` must be a
1558
- valid unsigned 8-bit integer.
1563
+ Writes ` value ` to the Buffer at the specified ` offset ` . The ` value ` should be a
1564
+ valid unsigned 8-bit integer. Behavior is not defined when ` value ` is anything
1565
+ other than an unsigned 8-bit integer.
1559
1566
1560
1567
Set ` noAssert ` to true to skip validation of ` value ` and ` offset ` . This means
1561
1568
that ` value ` may be too large for the specific function and ` offset ` may be
@@ -1585,7 +1592,8 @@ console.log(buf);
1585
1592
1586
1593
Writes ` value ` to the Buffer at the specified ` offset ` with specified endian
1587
1594
format (` writeUInt16BE() ` writes big endian, ` writeUInt16LE() ` writes little
1588
- endian). The ` value ` must be a valid unsigned 16-bit integer.
1595
+ endian). The ` value ` should be a valid unsigned 16-bit integer. Behavior is
1596
+ not defined when ` value ` is anything other than an unsigned 16-bit integer.
1589
1597
1590
1598
Set ` noAssert ` to true to skip validation of ` value ` and ` offset ` . This means
1591
1599
that ` value ` may be too large for the specific function and ` offset ` may be
@@ -1619,7 +1627,8 @@ console.log(buf);
1619
1627
1620
1628
Writes ` value ` to the Buffer at the specified ` offset ` with specified endian
1621
1629
format (` writeUInt32BE() ` writes big endian, ` writeUInt32LE() ` writes little
1622
- endian). The ` value ` must be a valid unsigned 32-bit integer.
1630
+ endian). The ` value ` should be a valid unsigned 32-bit integer. Behavior is
1631
+ not defined when ` value ` is anything other than an unsigned 32-bit integer.
1623
1632
1624
1633
Set ` noAssert ` to true to skip validation of ` value ` and ` offset ` . This means
1625
1634
that ` value ` may be too large for the specific function and ` offset ` may be
@@ -1665,6 +1674,8 @@ that `value` may be too large for the specific function and `offset` may be
1665
1674
beyond the end of the Buffer leading to the values being silently dropped. This
1666
1675
should not be used unless you are certain of correctness.
1667
1676
1677
+ Behavior is not defined when ` value ` is anything other than an unsigned integer.
1678
+
1668
1679
## buffer.INSPECT_MAX_BYTES
1669
1680
1670
1681
* {Number} Default: 50
0 commit comments