Skip to content

isArray

isArray<I>(xs): xs is I[]

Checks if xs is classified as Array.

Example

asArray(1)
// => [1]
asArray([2, 3, 4])
// => [2, 3, 4]

Alternatives

Type Parameters

I

The element type of the Iterable class.

Parameters

xs

unknown

The value to check.

Returns

xs is I[]

Returns true if xs is an Array, else false.