Js.Array
Bindings to the functions in Array.prototype
JavaScript Array API
type 'a array_like = 'a Js.array_like
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 entries : 'a t -> (int * 'a) Js.iterator
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 keys : 'a t -> int Js.iterator
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
val values : 'a t -> 'a Js.iterator