MCPcopy Index your code
hub / github.com/nodejs/node-addon-api / Data

Method Data

napi-inl.h:2081–2086  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2079
2080template <typename T>
2081inline T* External<T>::Data() const {
2082 void* data;
2083 napi_status status = napi_get_value_external(_env, _value, &data);
2084 NAPI_THROW_IF_FAILED(_env, status, nullptr);
2085 return reinterpret_cast<T*>(data);
2086}
2087
2088////////////////////////////////////////////////////////////////////////////////
2089// Array class

Callers 15

WrapperMethod · 0.80
WrapperMethod · 0.80
GetterWrapperMethod · 0.80
SetterWrapperMethod · 0.80
NewMethod · 0.80

Calls

no outgoing calls

Tested by 5

TestMethod · 0.64
TestGetterWithUserDataFunction · 0.64
TestSetterWithUserDataFunction · 0.64
TestFunctionWithUserDataFunction · 0.64