isArray
A TypeScript type guard that checks whether a value is an array, narrowing the type so you can safely access array methods in your code.
Usage
Check whether a value is an array. This is a TypeScript type guard function.
import { isArray } from '@movk/core'
isArray([]) // => true
isArray([1, 2]) // => true
isArray({}) // => false
API
isArray(value: any): value is any[]
Parameters
value
any required
The value to check.
Returns
boolean
Returns
true if the value is an array, otherwise false.Changelog
No recent changes