Skip to content

util: introduce `util.types.is[…]` type checks

Provide public APIs for native typechecking that is actually useful. The motivation for this is providing alternatives to userland modules that would currently rely on process.binding('util').

This is based off the list in v8.h, with things that have better JS equivalents removed; I’m happy to bikeshed this list.

Also, for context, previous efforts:

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

util

Merge request reports

Loading