pub fn from_closure(closure: Closure) -> JSObject {
        let params_count = closure.function.params.len() as f64;
        let mut function_object = JSObject {
            proto: Heap::FUNCTION_PROTO,
            value: ObjectValue::Closure(closure),
            properties: HashMap::new(),
        };
        function_object
            .set_nonconf("length", Content::from(params_count))
            .unwrap();
        function_object
    }
/// Wrap the given `closure` into a Function.
Wrap the given `closure` into a Function.
Wrap the given ` closure ` into a Function .
pub fn from_closure(closure: Closure) -> JSObject {
        let params_count = closure.function.params.len() as f64;
        let mut function_object = JSObject {
            proto: Heap::FUNCTION_PROTO,
            value: ObjectValue::Closure(closure),
            properties: HashMap::new(),
        };
        function_object
            .set_nonconf("length", Content::from(params_count))
            .unwrap();
        function_object
    }
pub fn from_closure ( closure : Closure ) -> JSObject { let params_count = closure . function . params . len ( ) as f64 ; let mut function_object = JSObject { proto : Heap :: FUNCTION_PROTO , value : ObjectValue :: Closure ( closure ) , properties : HashMap :: new ( ) , } ; function_object . set_nonconf ( " " , Content :: from ( params_count ) ) . unwrap ( ) ; function_object }
Wrap the given `closure` into a Function.
Wrap the given ` closure ` into a Function .
closure
Closure
closure
Closure