JsArray

object JsArray
Companion:
class
class Object
trait Matchable
class Any
JsArray.type

Type members

Classlikes

final implicit class RichJsArray[A](val arr: JsArray[A]) extends AnyVal
final class RichScalaJsArray[A](val arr: Array[A]) extends AnyVal

Types

type DoNotMutate[A] = JsArray[A]

Value members

Concrete methods

def apply[A](items: A*): JsArray[A]

Creates a new array with the given items, equivalent to [item1, item2, ...] literal

Creates a new array with the given items, equivalent to [item1, item2, ...] literal

Note:If you want to preallocate N items, use new JsArray(N)

See also:
def from[A](iterable: JsIterable[A]): JsArray[A]

Creates a new array from a JS iterable (array, set, map, etc.).

Creates a new array from a JS iterable (array, set, map, etc.).

!! Not supported by IE !!

See also:
def from[A](arr: Array[A]): JsArray[A]

Cast a js.Array to JsArray. It's safe because they have the same runtime representation.

Cast a js.Array to JsArray. It's safe because they have the same runtime representation.

def isArray(arg: Any): Boolean

Returns true if the given value is an array.

Implicits

Implicits

final implicit def RichJsArray[A](arr: JsArray[A]): RichJsArray[A]