lib: extract validateObject validator
Pulls out the common argument validateObject
validator to internal/validators.
BTW, there is inconsistent ERR_INVALID_ARG_TYPE
via the object
validation: object
or Object
, do we need to unify this error message ? Although this is so trivial :)
https://github.com/nodejs/node/blob/951b1c3e09bae8395dde0d4f5cecb1fde117fa94/lib/path.js#L896
Update: unify the error message by lowercase object
(should be semver-major?)
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines