Function js::jsapi::ToPrimitive [] [src]

pub unsafe extern "C" fn ToPrimitive(
    cx: *mut JSContext,
    obj: HandleObject,
    hint: JSType,
    vp: MutableHandleValue
) -> bool

Convert obj to a primitive value. On success, store the result in vp and return true.

The hint argument must be JSTYPE_STRING, JSTYPE_NUMBER, or JSTYPE_VOID (no hint).

Implements: ES6 7.1.1 ToPrimitive(input, [PreferredType]).