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

Method FunctionOrEmpty

napi-inl.h:6215–6222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6213 typename DataType,
6214 void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
6215Napi::Function
6216TypedThreadSafeFunction<ContextType, DataType, CallJs>::FunctionOrEmpty(
6217 Napi::Env env, Napi::Function& callback) {
6218 if (callback.IsEmpty()) {
6219 return EmptyFunctionFactory(env);
6220 }
6221 return callback;
6222}
6223
6224#else
6225// static

Callers

nothing calls this directly

Calls 1

IsEmptyMethod · 0.80

Tested by

no test coverage detected