//! The two directions of the bridge, as free functions.
//!
//! [`crate::convert`] owns the actual conversions; this module exists so that the exported
//! API files can write `jsvalue_of(value)` and `value_of(js)` without each of them importing
//! the same pair of names. The names read the way the C API does — a `JSValue` is what goes
//! over the boundary, a `Value` is what the engine holds.
use Value;
use crateconvert;
use crateJsValue;
/// Box an engine value as a `JSValue` the caller owns.
/// The engine value behind a `JSValue`, when it is one this layer can decode.
///
/// # Safety
///
/// `value` must be a `JSValue` from this crate (or a primitive), and a reference-counted one
/// must be alive.
pub unsafe