You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If `totalLength` is provided, it is coerced to an unsigned integer. If the
This is not what happens. Instead, non-integers throw:
> Buffer.concat([Buffer.of()],2.6)
Uncaught:
RangeError [ERR_OUT_OF_RANGE]: The value of "length" is out of range. It must be an integer. Received 2.6
at validateOffset (node:buffer:123:3)
at Buffer.concat (node:buffer:590:5) {
code: 'ERR_OUT_OF_RANGE'
}
> Buffer.concat([Buffer.of()],'10')
Uncaught:
TypeError [ERR_INVALID_ARG_TYPE]: The "length" argument must be of type number. Received type string ('10')
at validateOffset (node:buffer:123:3)
at Buffer.concat (node:buffer:590:5) {
code: 'ERR_INVALID_ARG_TYPE'
}
Less significant, but also confusing (ref: #55562)
Activity
gurgunday commentedon Oct 25, 2025
Yeah... you're right