Express Sweet API Reference - v3.0.0
    Preparing search index...

    Variable isArray

    isArray: (value: any) => boolean

    Check if a value is an array using Object.prototype.toString. More reliable than instanceof Array for cross-frame scenarios.

    Type Declaration

      • (value: any): boolean
      • Parameters

        • value: any

          The value to check

        Returns boolean

        Returns true if value is an array, false otherwise

    import isArray from '~/utils/isArray';

    isArray([1, 2, 3]); // true
    isArray('hello'); // false
    isArray({0: 'a', 1: 'b', length: 2}); // false (array-like object)