This commit is contained in:
2026-01-25 20:29:49 -06:00
parent 8325253f1a
commit 086508bacd
12 changed files with 131 additions and 321 deletions

View File

@@ -533,17 +533,23 @@ static inline JS_BOOL JS_IsString(JSValueConst v)
JS_VALUE_GET_TAG(v) == JS_TAG_STRING_ROPE;
}
static inline JS_BOOL JS_IsText(JSValueConst v) { return JS_IsString(v); }
static inline JS_BOOL JS_IsSymbol(JSValueConst v)
{
return JS_VALUE_GET_TAG(v) == JS_TAG_SYMBOL;
}
static inline JS_BOOL JS_IsFunction(JSValueConst v)
{
return JS_VALUE_GET_TAG(v) == JS_TAG_FUNCTION;
}
static inline JS_BOOL JS_IsObject(JSValueConst v)
{
return JS_VALUE_GET_TAG(v) == JS_TAG_OBJECT;
}
int JS_IsArray(JSContext *ctx, JSValueConst val);
JS_BOOL JS_IsFunction(JSContext* ctx, JSValueConst val);
// Fundamental
int JS_GetLength(JSContext *ctx, JSValueConst obj, int64_t *pres);