Skip to main content

isArray

Checks if a value is an array.

Import

You can import the entire package and access the function:


_10
import * as sdk from "@onflow/sdk"
_10
_10
sdk.isArray(d)

Or import directly the specific function:


_10
import { isArray } from "@onflow/sdk"
_10
_10
isArray(d)

Usage


_10
import { isArray } from "@onflow/sdk"
_10
_10
console.log(isArray([1, 2, 3])); // true
_10
console.log(isArray("hello")); // false
_10
console.log(isArray({})); // false
_10
console.log(isArray(null)); // false

Parameters

d

  • Type: any
  • Description: The value to check

Returns

boolean


Rate this page