Js.Array
Provide bindings to Js array
JavaScript Array API
val from : 'a array_like -> 'a array
val fromMap : 'a array_like -> ('a -> 'b) -> 'b array
val copyWithin : to_:int -> 'a t as 'this -> 'this
val copyWithinFrom : to_:int -> from:int -> 'a t as 'this -> 'this
val copyWithinFromRange :
to_:int ->
start:int ->
end_:int ->
'a t as 'this ->
'this
val fillInPlace : 'a -> 'a t as 'this -> 'this
val fillFromInPlace : 'a -> from:int -> 'a t as 'this -> 'this
val fillRangeInPlace : 'a -> start:int -> end_:int -> 'a t as 'this -> 'this
val pop : 'a t as 'this -> 'a option
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push
val push : 'a -> 'a t as 'this -> int
val pushMany : 'a array -> 'a t as 'this -> int
val reverseInPlace : 'a t as 'this -> 'this
val shift : 'a t as 'this -> 'a option
val sortInPlace : 'a t as 'this -> 'this
val sortInPlaceWith : ('a -> 'a -> int) -> 'a t as 'this -> 'this
val spliceInPlace :
pos:int ->
remove:int ->
add:'a array ->
'a t as 'this ->
'this
val removeFromInPlace : pos:int -> 'a t as 'this -> 'this
val removeCountInPlace : pos:int -> count:int -> 'a t as 'this -> 'this
val unshift : 'a -> 'a t as 'this -> int
val unshiftMany : 'a array -> 'a t as 'this -> int
val append : 'a -> 'a t as 'this -> 'this
val concat : 'this -> 'a t as 'this -> 'this
val concatMany : 'this array -> 'a t as 'this -> 'this
val includes : 'a -> 'a t as 'this -> bool
ES2016
val indexOf : 'a -> 'a t as 'this -> int
val indexOfFrom : 'a -> from:int -> 'a t as 'this -> int
val join : 'a t -> string
val joinWith : string -> 'a t as 'this -> string
val lastIndexOf : 'a -> 'a t as 'this -> int
val lastIndexOfFrom : 'a -> from:int -> 'a t as 'this -> int
val lastIndexOf_start : 'a -> 'a t as 'this -> int
val slice : start:int -> end_:int -> 'a t as 'this -> 'this
val copy : 'a t as 'this -> 'this
val slice_copy : unit -> 'a t as 'this -> 'this
val sliceFrom : int -> 'a t as 'this -> 'this
val slice_start : int -> 'a t as 'this -> 'this
val toString : 'a t as 'this -> string
val toLocaleString : 'a t as 'this -> string
val every : ('a -> bool) -> 'a t as 'this -> bool
val everyi : ('a -> int -> bool) -> 'a t as 'this -> bool
val filter : ('a -> bool) -> 'a t as 'this -> 'this
should we use bool
or boolean
seems they are intechangeable here
val filteri : ('a -> int -> bool) -> 'a t as 'this -> 'this
val find : ('a -> bool) -> 'a t as 'this -> 'a option
val findi : ('a -> int -> bool) -> 'a t as 'this -> 'a option
val findIndex : ('a -> bool) -> 'a t as 'this -> int
val findIndexi : ('a -> int -> bool) -> 'a t as 'this -> int
val forEach : ('a -> unit) -> 'a t as 'this -> unit
val forEachi : ('a -> int -> unit) -> 'a t as 'this -> unit
val reduce : ('b -> 'a -> 'b) -> 'b -> 'a t as 'this -> 'b
val reducei : ('b -> 'a -> int -> 'b) -> 'b -> 'a t as 'this -> 'b
val reduceRight : ('b -> 'a -> 'b) -> 'b -> 'a t as 'this -> 'b
val reduceRighti : ('b -> 'a -> int -> 'b) -> 'b -> 'a t as 'this -> 'b
val some : ('a -> bool) -> 'a t as 'this -> bool
val somei : ('a -> int -> bool) -> 'a t as 'this -> bool