Module Js.Map

Bindings to functions in Map

ES6 Map API

type ('k, 'v) t
val make : unit -> ('k, 'v) t
val fromArray : ('k * 'v) array -> ('k, 'v) t
val toArray : ('k, 'v) t -> ('k * 'v) array
val size : ('k, 'v) t -> int
val has : ('k, 'v) t -> key:'k -> bool
val get : ('k, 'v) t -> key:'k -> 'v option
val set : ('k, 'v) t -> key:'k -> value:'v -> ('k, 'v) t
val clear : ('k, 'v) t -> unit
val delete : ('k, 'v) t -> key:'k -> bool
val forEach : f:('v -> 'k -> ('k, 'v) t -> unit) -> ('k, 'v) t -> unit
val keys : ('k, 'v) t -> 'k Js.iterator
val values : ('k, 'v) t -> 'v Js.iterator
val entries : ('k, 'v) t -> ('k * 'v) Js.iterator