Function script::dom::bindings::import::module::jsapi::JS::NumberToBigInt

source ·
pub unsafe extern "C" fn NumberToBigInt(
    cx: *mut JSContext,
    num: f64,
) -> *mut BigInt
Expand description

Create a BigInt from a floating-point value. If the number isn’t integral (that is, if it’s NaN, an infinity, or contains a fractional component), this function returns null and throws an exception.

Passing -0.0 will produce the bigint 0n.