Js.Array
Provide bindings to Js array
JavaScript Array API
val from : 'a array_like -> 'a array
val fromMap : 'a array_like -> f:('a -> 'b) -> 'b array
Mutating functions
val pop : 'a t -> 'a option
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push
val push : value:'a -> 'a t -> int
val pushMany : values:'a array -> 'a t -> int
val shift : 'a t -> 'a option
val unshift : value:'a -> 'a t -> int
val unshiftMany : values:'a array -> 'a t -> int
val includes : value:'a -> 'a t -> bool
ES2015
val join : ?sep:string -> 'a t -> string
Accessor functions
val indexOf : value:'a -> ?start:int -> 'a t -> int
val lastIndexOf : value:'a -> 'a t -> int
val lastIndexOfFrom : value:'a -> start:int -> 'a t -> int
val toString : 'a t -> string
val toLocaleString : 'a t -> string
Iteration functions
val every : f:('a -> bool) -> 'a t -> bool
val everyi : f:('a -> int -> bool) -> 'a t -> bool
val find : f:('a -> bool) -> 'a t -> 'a option
val findi : f:('a -> int -> bool) -> 'a t -> 'a option
val findIndex : f:('a -> bool) -> 'a t -> int
val findIndexi : f:('a -> int -> bool) -> 'a t -> int
val forEach : f:('a -> unit) -> 'a t -> unit
val forEachi : f:('a -> int -> unit) -> 'a t -> unit
val reduce : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b
val reducei : f:('b -> 'a -> int -> 'b) -> init:'b -> 'a t -> 'b
val reduceRight : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b
val reduceRighti : f:('b -> 'a -> int -> 'b) -> init:'b -> 'a t -> 'b
val some : f:('a -> bool) -> 'a t -> bool
val somei : f:('a -> int -> bool) -> 'a t -> bool