-
Notifications
You must be signed in to change notification settings - Fork 288
Open
Description
The Map object type seems to be missing from the bindings.
Given it requires the use of new
to be instantiated (just like e.g. Promise), I guess it should be exposed in those bindings.
I'm currently trying to create an instance of Map
with the bindings, but it seems rather complex since using new requires to to use the napi unsafe api... is there something I've missed here ?
My current solution is to use the eval function to create the Map, which is a bit wasteful ^^
let new_map_code = cx.string("(function() { return new Map(); })");
let js_map = neon::reflect::eval(cx, new_map_code)?.downcast_or_throw::<JsObject, _>(cx)?;
So would you accept a PR to add Map in the bindings ?
Metadata
Metadata
Assignees
Labels
No labels