isArray
Checks if a value is an array.
Import
You can import the entire package and access the function:
_10import * as sdk from "@onflow/sdk"_10_10sdk.isArray(d)
Or import directly the specific function:
_10import { isArray } from "@onflow/sdk"_10_10isArray(d)
Usage
_10import { isArray } from "@onflow/sdk"_10_10console.log(isArray([1, 2, 3])); // true_10console.log(isArray("hello")); // false_10console.log(isArray({})); // false_10console.log(isArray(null)); // false
Parameters
d
- Type:
any
- Description: The value to check
Returns
boolean