isArray
A function that checks whether a given argument is an array, and if so, narrows the type of the argument to Array.
Code
Interface
typescript
const isArray: <T>(value: unknown) => value is T[] | readonly T[]
Usage
typescript
import { isArray } from '@modern-kit/utils';
isArray([]); // true
isArray(() => {}); // false
isArray('123'); // false
isArray(123); // false
isArray({}); // false