pub unsafe extern "C" fn OrdinaryToPrimitive(
cx: *mut JSContext,
obj: Handle<*mut JSObject>,
type_: JSType,
vp: MutableHandle<Value>,
) -> bool
Expand description
ES6 draft 20141224, 7.1.1, second algorithm.
Most users shouldn’t call this – use JS::ToBoolean, ToNumber, or ToString instead. This will typically only be called from custom convert hooks that wish to fall back to the ES6 default conversion behavior shared by most objects in JS, codified as OrdinaryToPrimitive.