Skip to content

isArray

Determine if a value is an Array

42 bytes

Usage

Pass in a value and get a boolean telling you if the value is an Array.

import * as
import _
_
from 'radashi'
import _
_
.
isArray<string>(value: string): value is never
export isArray

Literally just Array.isArray but with better type inference.

@seehttps://radashi.js.org/reference/typed/isArray

@example

isArray([]) // => true
isArray('hello') // => false

@version12.1.0

isArray
('hello') // => false
import _
_
.
isArray<string[]>(value: string[]): value is string[]
export isArray

Literally just Array.isArray but with better type inference.

@seehttps://radashi.js.org/reference/typed/isArray

@example

isArray([]) // => true
isArray('hello') // => false

@version12.1.0

isArray
(['hello']) // => true