1. napi_status napi_instanceof(napi_env env,
    2. napi_value object,
    3. napi_value constructor,
    4. bool* result)
    • [in] env: The environment that the API is invoked under.
    • [in] object: The JavaScript value to check.
    • [in] constructor: The JavaScript function object of the constructor function to check against.
    • [out] result: Boolean that is set to true if object instanceof constructor is true.

    Returns napi_ok if the API succeeded.

    This API represents invoking the instanceof Operator on the object as defined in [Section 12.10.4][] of the ECMAScript Language Specification.