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

Function MaybeUnwrap

test/common/test_helper.h:25–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 */
24template <typename T>
25inline T MaybeUnwrap(MaybeOrValue<T> maybe) {
26#if defined(NODE_ADDON_API_ENABLE_MAYBE)
27 return maybe.Unwrap();
28#else
29 return maybe;
30#endif
31}
32
33/**
34 * A test helper that converts MaybeOrValue<T> to T by getting the value that

Callers 15

OnCalledAsFunctionMethod · 0.85
RunPlainStringFunction · 0.85
RunStdStringFunction · 0.85
RunWithContextFunction · 0.85
IsLosslessFunction · 0.85
GetterMethod · 0.85
StaticGetterFunction · 0.85
TestStaticMethodFunction · 0.85
TestStaticMethodInternalFunction · 0.85
CanUnWrapMethod · 0.85
SetterMethod · 0.85
TestMethodMethod · 0.85

Calls 1

UnwrapMethod · 0.80

Tested by

no test coverage detected