MCPcopy Create free account
hub / github.com/expo/expo / isFunction

Method isFunction

packages/expo-modules-core/android/src/main/cpp/JavaScriptValue.cpp:107–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107bool JavaScriptValue::isFunction() {
108 if (jsValue->isObject()) {
109 auto runtime = runtimeHolder.lock();
110 assert((runtime != nullptr) && "JS Runtime was used after deallocation");
111 auto &rawRuntime = runtime->get();
112
113 return jsValue->asObject(rawRuntime).isFunction(rawRuntime);
114 }
115
116 return false;
117}
118
119bool JavaScriptValue::isArray() {
120 if (jsValue->isObject()) {

Calls 5

getMethod · 0.65
assertFunction · 0.50
isObjectMethod · 0.45
lockMethod · 0.45
asObjectMethod · 0.45