Description
JS_ValueToBoolean converts a specified JS value, v, to a JS Boolean. The actual conversion is performed by the object's convert operation. Converting any JS value to a Boolean always succeeds, except when the JS value is a JSVAL_OBJECT that does not support its own conversion routine.
The converted value is stored in the JSBool pointed to by bp. If the conversion is successful, JS_ValueToBoolean returns JS_TRUE. If the value to convert is an empty string, or conversion is unsuccessful, JS_ValueToBoolean returns JS_FALSE.
|