---
title: isNull
nav:
  title: Tools
  path: /tools
group:
  title: Types
toc: content
---

## isNull

Demo:

```tsx
/**
 * title: 基础用法
 * description: 判断是否为 null 类型函数
 */

import React from 'react';
import { isNull } from 'aim-tools';

const result1 = isNull([1, 2]);
const result2 = isNull(null);
const result3 = isNull(undefined);

export default () => (
  <pre>
    <code>
      isNull([1, 2]); // {result1.toString()}
      <br />
      <br />
      isNull(null); // {result2.toString()}
      <br />
      <br />
      isNull(undefined); // {result3.toString()}
    </code>
  </pre>
);
```

### API

```typescript
isNull(data: any);
```

### Params

| 参数 | 说明           | 类型 | 默认值 | 必填 |
| :--- | :------------- | :--- | :----- | :--- |
| data | 需要判断的数据 | any  | -      | 是   |

### Returns

| 返回值 | 说明                     |
| :----- | :----------------------- |
| true   | 该数据是 null 类型数据   |
| false  | 该数据不是 null 类型数据 |
