| 1188 | if (JS_IsNull(jsValue) != 0) { |
| 1189 | return Valdi::ValueType::Null; |
| 1190 | } |
| 1191 | if (JS_IsString(jsValue) != 0) { |
| 1192 | return Valdi::ValueType::StaticString; |
| 1193 | } |
| 1194 | if (JS_IsBigInt(_context, jsValue)) { |
| 1195 | return Valdi::ValueType::BigInt; |
| 1196 | } |
| 1197 | if (JS_IsNumber(jsValue) != 0) { |
| 1198 | return Valdi::ValueType::Double; |
| 1199 | } |
| 1200 | if (JS_IsBool(jsValue) != 0) { |
| 1201 | return Valdi::ValueType::Bool; |
| 1202 | } |
| 1203 | if (JS_IsArray(_context, jsValue) != 0) { |
| 1204 | return Valdi::ValueType::Array; |
| 1205 | } |
| 1206 | if (JS_IsObjectOfClass(_context, jsValue, getWrappedObjectClassDef()->classID) != 0) { |
| 1207 | return Valdi::ValueType::ValdiObject; |
| 1208 | } |
| 1209 | if (JS_IsFunction(_context, jsValue) != 0) { |
| 1210 | return Valdi::ValueType::Function; |
| 1211 | } |
| 1212 | if (JS_GetTypedArrayType(_context, jsValue) != JS_TYPED_ARRAY_NONE || JS_IsArrayBuffer(_context, jsValue) != 0) { |
| 1213 | return Valdi::ValueType::TypedArray; |
| 1214 | } |
| 1215 | if (JS_IsError(_context, jsValue) != 0) { |
| 1216 | return Valdi::ValueType::Error; |
| 1217 | } |
| 1218 | if (JS_IsSymbol(jsValue) != 0) { |
| 1219 | // Symbols are opaque types that we don't support exporting |
nothing calls this directly
no test coverage detected