Checks if the type of value is an Array.

import { isArray, isObject } from "@nevware21/ts-utils";

function performAction(value: any) {
if (isArray(value) || isObject(value)) {
// Do something
} else {
// Do something else
}
}
  • Type Parameters

    • T = any

    Parameters

    • arg: any

      Value to be checked.

    Returns arg is T[]

    True if the value is a Array, false otherwise.