We have
-
napi_is_array (val->IsArray())
-
napi_is_buffer (node::Buffer::HasInstance())
-
napi_is_arraybuffer (val->IsArrayBuffer())
-
napi_is_typedarray (val->IsTypedArray())
that have NAPI_PREAMBLE(), whereas
-
napi_is_error (val->IsNativeError())
does not have it.
I don't believe the ones above that have NAPI_PREAMBLE() need it, for the same reason that napi_typeof() doesn't need it. What do @nodejs/addon-api think?
We have
napi_is_array(val->IsArray())napi_is_buffer(node::Buffer::HasInstance())napi_is_arraybuffer(val->IsArrayBuffer())napi_is_typedarray(val->IsTypedArray())that have
NAPI_PREAMBLE(), whereasnapi_is_error(val->IsNativeError())does not have it.
I don't believe the ones above that have
NAPI_PREAMBLE()need it, for the same reason thatnapi_typeof()doesn't need it. What do @nodejs/addon-api think?