From 6e59723fbf380950fa901fd33326a00346ead607 Mon Sep 17 00:00:00 2001 From: Duncan Date: Sun, 27 Oct 2024 00:30:17 -0400 Subject: [PATCH 1/2] buffer: document concat zero-fill --- doc/api/buffer.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index d72e8720c688fa..5e5cfb06e68170 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -1042,7 +1042,8 @@ in `list` by adding their lengths. If `totalLength` is provided, it is coerced to an unsigned integer. If the combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is -truncated to `totalLength`. +truncated to `totalLength`. If the combined length of the `Buffer`s in `list` is +less than `totalLength` then the remaining space is filled with zeros. ```mjs import { Buffer } from 'node:buffer'; From 2858bb544eac1b673017d5b36f18ad787e3d9557 Mon Sep 17 00:00:00 2001 From: Duncan Date: Sun, 27 Oct 2024 15:44:08 -0400 Subject: [PATCH 2/2] buffer: update doc/api/buffer.md Co-authored-by: Aviv Keller --- doc/api/buffer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 5e5cfb06e68170..c07443601c8b67 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -1043,7 +1043,7 @@ in `list` by adding their lengths. If `totalLength` is provided, it is coerced to an unsigned integer. If the combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is truncated to `totalLength`. If the combined length of the `Buffer`s in `list` is -less than `totalLength` then the remaining space is filled with zeros. +less than `totalLength`, the remaining space is filled with zeros. ```mjs import { Buffer } from 'node:buffer';