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

Method kind

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

Source from the content-addressed store, hash-verified

47}
48
49std::string JavaScriptValue::kind() {
50 if (isNull()) {
51 return "null";
52 }
53 if (isUndefined()) {
54 return "undefined";
55 }
56 if (isBool()) {
57 return "boolean";
58 }
59 if (isNumber()) {
60 return "number";
61 }
62 if (isString()) {
63 return "string";
64 }
65 if (isSymbol()) {
66 return "symbol";
67 }
68 if (isFunction()) {
69 return "function";
70 }
71 if (isArray()) {
72 return "array";
73 }
74 if (isObject()) {
75 return "object";
76 }
77
78 throwNewJavaException(
79 UnexpectedException::create("Unknown type").get()
80 );
81}
82
83bool JavaScriptValue::isNull() {
84 return jsValue->isNull();

Callers 11

should_wrap_numbersMethod · 0.45
should_wrap_stringsMethod · 0.45
should_wrap_booleansMethod · 0.45
should_wrap_objectsMethod · 0.45
creates_shared_dataMethod · 0.45
evaluate_returns_nullMethod · 0.45
evaluate_returns_boolMethod · 0.45

Calls 4

throwNewJavaExceptionFunction · 0.85
getMethod · 0.65
isObjectFunction · 0.50
createFunction · 0.50

Tested by 11

should_wrap_numbersMethod · 0.36
should_wrap_stringsMethod · 0.36
should_wrap_booleansMethod · 0.36
should_wrap_objectsMethod · 0.36
creates_shared_dataMethod · 0.36
evaluate_returns_nullMethod · 0.36
evaluate_returns_boolMethod · 0.36