JSBool JS_ValueToBoolean()

Usage

JSBool JS_ValueToBoolean(JSContext *cx, jsval v, JSBool *bp); 

Description

Method; extracts a function argument from a jsval structure, converts it to a Boolean value (if possible), and passes the converted value back to the caller.

Arguments

JSContext *cx, jsval v, JSBool *bp

Returns

A Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.