fix tests; add comprehensive tests for functions and fix bugs in the mach VM regarding them.
This commit is contained in:
@@ -267,6 +267,19 @@ JS_BOOL JS_IsBlob(JSValue v);
|
||||
JS_BOOL JS_IsText(JSValue v);
|
||||
JS_BOOL JS_IsStone(JSValue v);
|
||||
|
||||
/* Sensory function wrappers (require JSContext for string inspection) */
|
||||
JS_BOOL JS_IsDigit(JSContext *ctx, JSValue val);
|
||||
JS_BOOL JS_IsLetter(JSContext *ctx, JSValue val);
|
||||
JS_BOOL JS_IsLower(JSContext *ctx, JSValue val);
|
||||
JS_BOOL JS_IsUpper(JSContext *ctx, JSValue val);
|
||||
JS_BOOL JS_IsWhitespace(JSContext *ctx, JSValue val);
|
||||
JS_BOOL JS_IsCharacter(JSContext *ctx, JSValue val);
|
||||
JS_BOOL JS_IsFit(JSContext *ctx, JSValue val);
|
||||
JS_BOOL JS_IsData(JSValue val);
|
||||
static inline JS_BOOL JS_IsTrue(JSValue v) { return v == JS_TRUE; }
|
||||
static inline JS_BOOL JS_IsFalse(JSValue v) { return v == JS_FALSE; }
|
||||
JS_BOOL JS_IsActor(JSContext *ctx, JSValue val);
|
||||
|
||||
/* ============================================================
|
||||
GC References — no-ops with copying GC
|
||||
============================================================ */
|
||||
@@ -559,6 +572,14 @@ JSValue JS_CellObject (JSContext *ctx, JSValue proto, JSValue props);
|
||||
/* Format */
|
||||
JSValue JS_CellFormat (JSContext *ctx, JSValue text, JSValue collection, JSValue transformer);
|
||||
|
||||
/* Additional cell functions */
|
||||
JSValue JS_CellLogical (JSContext *ctx, JSValue val);
|
||||
JSValue JS_CellEvery (JSContext *ctx, JSValue arr, JSValue pred);
|
||||
JSValue JS_CellSome (JSContext *ctx, JSValue arr, JSValue pred);
|
||||
JSValue JS_CellStartsWith (JSContext *ctx, JSValue text, JSValue prefix);
|
||||
JSValue JS_CellEndsWith (JSContext *ctx, JSValue text, JSValue suffix);
|
||||
JSValue JS_CellNormalize (JSContext *ctx, JSValue text);
|
||||
|
||||
/* Output helpers */
|
||||
void JS_PrintText (JSContext *ctx, JSValue val);
|
||||
void JS_PrintTextLn (JSContext *ctx, JSValue val);
|
||||
|
||||
Reference in New Issue
Block a user