pub(crate) fn init(global: &Value) -> (&str, Value) {
        let _timer = BoaProfiler::global().start_event(Self::NAME, "init");

        // Create prototype
        let prototype = Value::new_object(Some(global));

        make_builtin_fn(Self::set, "set", &prototype, 2);
        make_builtin_fn(Self::delete, "delete", &prototype, 1);
        make_builtin_fn(Self::get, "get", &prototype, 1);
        make_builtin_fn(Self::clear, "clear", &prototype, 0);
        make_builtin_fn(Self::has, "has", &prototype, 1);
        make_builtin_fn(Self::for_each, "forEach", &prototype, 1);

        let map_object = make_constructor_fn(
            Self::NAME,
            Self::LENGTH,
            Self::make_map,
            global,
            prototype,
            true,
            false,
        );

        (Self::NAME, map_object)
    }
/// Initialise the `Map` object on the global object.
Initialise the `Map` object on the global object.
Initialise the ` Map ` object on the global object .
pub(crate) fn init(global: &Value) -> (&str, Value) {
        let _timer = BoaProfiler::global().start_event(Self::NAME, "init");
        // Create prototype
        let prototype = Value::new_object(Some(global));
        make_builtin_fn(Self::set, "set", &prototype, 2);
        make_builtin_fn(Self::delete, "delete", &prototype, 1);
        make_builtin_fn(Self::get, "get", &prototype, 1);
        make_builtin_fn(Self::clear, "clear", &prototype, 0);
        make_builtin_fn(Self::has, "has", &prototype, 1);
        make_builtin_fn(Self::for_each, "forEach", &prototype, 1);
        let map_object = make_constructor_fn(
            Self::NAME,
            Self::LENGTH,
            Self::make_map,
            global,
            prototype,
            true,
            false,
        );
        (Self::NAME, map_object)
    }
pub ( crate ) fn init ( global : & Value ) -> ( & str , Value ) { let _timer = BoaProfiler :: global ( ) . start_event ( Self :: NAME , " " ) ; // Create prototype let prototype = Value :: new_object ( Some ( global ) ) ; make_builtin_fn ( Self :: set , " " , & prototype , 2 ) ; make_builtin_fn ( Self :: delete , " " , & prototype , 1 ) ; make_builtin_fn ( Self :: get , " " , & prototype , 1 ) ; make_builtin_fn ( Self :: clear , " " , & prototype , 0 ) ; make_builtin_fn ( Self :: has , " " , & prototype , 1 ) ; make_builtin_fn ( Self :: for_each , " " , & prototype , 1 ) ; let map_object = make_constructor_fn ( Self :: NAME , Self :: LENGTH , Self :: make_map , global , prototype , true , false , ) ; ( Self :: NAME , map_object ) }
Initialise the `Map` object on the global object.
Initialise the ` Map ` object on the global object .
global
&Value