buffer: validate arg for compare
Refs: https://github.com/nodejs/node/pull/23840
Makes server-major changes to buf.compare()
argument validation, to be in line with docs (require areg to be Number
. Disable coerce string like 0xff
);
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines