For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /reference/predicate/isArray.md.

isArray

Checks if a value is an array.

isArray([1, 2]) // true
isArray('hello') // false

Usage

isArray(value: unknown)

Checks if a value is an array.

import { isArray } from 'massaman'
// or:  import { isArray } from 'massaman/predicate'

isArray([1, 2]) // true
isArray('hello') // false

Parameters

valueunknownrequired

the value to test.

Returns

whether value is an array; a true result narrows it to unknown[].

value is unknown[]