From 05407f27995d0ea7e6545a509c440ef8fc4e4a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Isager=20Dalsgar=C3=B0?= Date: Sat, 7 Mar 2026 12:06:40 +0100 Subject: [PATCH] Expose `JS_IsObject()` --- mquickjs.c | 2 +- mquickjs.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mquickjs.c b/mquickjs.c index a950f3c..c19c2e6 100644 --- a/mquickjs.c +++ b/mquickjs.c @@ -1093,7 +1093,7 @@ static BOOL JS_IsPrimitive(JSContext *ctx, JSValue val) } /* Note: short functions are not considered as objects by this function */ -static BOOL JS_IsObject(JSContext *ctx, JSValue val) +BOOL JS_IsObject(JSContext *ctx, JSValue val) { if (!JS_IsPtr(val)) { return FALSE; diff --git a/mquickjs.h b/mquickjs.h index a1557fe..5e83e92 100644 --- a/mquickjs.h +++ b/mquickjs.h @@ -206,6 +206,7 @@ static inline JSValue JS_NewBool(int val) JS_BOOL JS_IsNumber(JSContext *ctx, JSValue val); JS_BOOL JS_IsString(JSContext *ctx, JSValue val); JS_BOOL JS_IsError(JSContext *ctx, JSValue val); +JS_BOOL JS_IsObject(JSContext *ctx, JSValue val); JS_BOOL JS_IsFunction(JSContext *ctx, JSValue val); int JS_GetClassID(JSContext *ctx, JSValue val);