Module Js_array2

module Js_array2: sig .. end
JavaScript Array API

type 'a t = 'a array 
type 'a array_like 
val from : 'a array_like -> 'b array
val fromMap : 'a array_like -> ('a -> 'b) -> 'b array
ES2015
val isArray : 'a -> bool
ES2015

ES2015

ES2015
val length : 'a array -> int
val copyWithin : 'a t -> to_:int -> 'a t
val copyWithinFrom : 'a t -> to_:int -> from:int -> 'a t
ES2015
val copyWithinFromRange : 'a t -> to_:int -> start:int -> end_:int -> 'a t
ES2015

ES2015
val fillInPlace : 'a t -> 'a -> 'a t
val fillFromInPlace : 'a t -> 'a -> from:int -> 'a t
ES2015
val fillRangeInPlace : 'a t -> 'a -> start:int -> end_:int -> 'a t
ES2015

ES2015
val pop : 'a t -> 'a option
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push
val push : 'a t -> 'a -> int
val pushMany : 'a t -> 'a array -> int
val reverseInPlace : 'a t -> 'a t
val shift : 'a t -> 'a option
val sortInPlace : 'a t -> 'a t
val sortInPlaceWith : 'a t -> ('a -> 'a -> int) -> 'a t
val spliceInPlace : 'a t -> pos:int -> remove:int -> add:'a array -> 'a t
val removeFromInPlace : 'a t -> pos:int -> 'a t
val removeCountInPlace : 'a t -> pos:int -> count:int -> 'a t
val unshift : 'a t -> 'a -> int
val unshiftMany : 'a t -> 'a array -> int
val append : 'a t -> 'a -> 'a t
val concat : 'a t -> 'a t -> 'a t
val concatMany : 'a t -> 'a t array -> 'a t
val includes : 'a t -> 'a -> bool

ES2016
val indexOf : 'a t -> 'a -> int
val indexOfFrom : 'a t -> 'a -> from:int -> int
val joinWith : 'a t -> string -> string
val lastIndexOf : 'a t -> 'a -> int
val lastIndexOfFrom : 'a t -> 'a -> from:int -> int
val slice : 'a t -> start:int -> end_:int -> 'a t
val copy : 'a t -> 'a t
val sliceFrom : 'a t -> int -> 'a t
val toString : 'a t -> string
val toLocaleString : 'a t -> string
val every : 'a t -> ('a -> bool) -> bool
val everyi : 'a t -> ('a -> int -> bool) -> bool
val filter : 'a t -> ('a -> bool) -> 'a t
should we use bool or boolan seems they are intechangeable here
val filteri : 'a t -> ('a -> int -> bool) -> 'a t
val find : 'a t -> ('a -> bool) -> 'a option
val findi : 'a t -> ('a -> int -> bool) -> 'a option
ES2015

ES2015
val findIndex : 'a t -> ('a -> bool) -> int
val findIndexi : 'a t -> ('a -> int -> bool) -> int
ES2015

ES2015
val forEach : 'a t -> ('a -> unit) -> unit
val forEachi : 'a t -> ('a -> int -> unit) -> unit
val map : 'a t -> ('a -> 'b) -> 'b t
val mapi : 'a t -> ('a -> int -> 'b) -> 'b t
val reduce : 'a t -> ('b -> 'a -> 'b) -> 'b -> 'b
val reducei : 'a t -> ('b -> 'a -> int -> 'b) -> 'b -> 'b
val reduceRight : 'a t -> ('b -> 'a -> 'b) -> 'b -> 'b
val reduceRighti : 'a t -> ('b -> 'a -> int -> 'b) -> 'b -> 'b
val some : 'a t -> ('a -> bool) -> bool
val somei : 'a t -> ('a -> int -> bool) -> bool
val unsafe_get : 'a array -> int -> 'a
val unsafe_set : 'a array -> int -> 'a -> unit