---
title: isArray
nav:
  title: Tools
  path: /tools
group:
  title: Types
toc: content
---

## isArray

Demo:

```tsx
/**
 * title: 基础用法
 * description: 判断是否为 Array 类型函数
 */

import React from 'react';
import { isArray } from 'aim-tools';

const result1 = isArray([1, 2]);
const result2 = isArray(12);

export default () => (
  <pre>
    <code>
      isArray([1, 2]); // {result1.toString()}
      <br />
      <br />
      isArray(12); // {result2.toString()}
    </code>
  </pre>
);
```

### API

```typescript
isArray(data: any);
```

### Params

| 参数 | 说明           | 类型 | 默认值 | 必填 |
| :--- | :------------- | :--- | :----- | :--- |
| data | 需要判断的数据 | any  | -      | 是   |

### Returns

| 返回值 | 说明                      |
| :----- | :------------------------ |
| true   | 该数据是 Array 类型数据   |
| false  | 该数据不是 Array 类型数据 |
