lib: use validateArray for array arguments
Three call sites still duplicated the ArrayIsArray check that validateArray already performs. Both files were already importing other validators next to these checks. The error code, argument name and expected type are unchanged, so the thrown error stays identical. The ArrayIsArray primordial is no longer used in histogram.js and is dropped from its destructuring; blocklist.js still uses it elsewhere. The existing tests only asserted the error code, so assertions covering the full error message are added for all three call sites. They pass both before and after this change. Refs: https://github.com/nodejs/node/pull/64959 Assisted-by: claude:fable-5 Signed-off-by: JunHwan Choi <devjunsday@gmail.com> PR-URL: https://github.com/nodejs/node/pull/65344 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
J
JunHwan Choi committed
96b12934a2441e3dd67b58f3a129611165085b41
Parent: e7a69c4
Committed by Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
on 8/25/2026, 11:57:32 PM