Skip to content

n-api: set the 'length' property of functions

Refs: https://github.com/nodejs/node/issues/28196

In this PR I added two new functions:

  • napi_create_function_with_length
  • napi_define_class_with_length

Both of these functions accept a parameter called params that represents the number of parameters passed to the native callback function and it is used to set the length property.

@nodejs/n-api This is a WIP PR and I want some feedback about this work after that I will continue adding tests and documentation.

  • 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

Merge request reports

Loading