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

## isUndefined

Demo:

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

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

const result1 = isUndefined('123');
const result2 = isUndefined(undefined);
const result3 = isUndefined(null);

export default () => (
  <pre>
    <code>
      isUndefined('123'); // {result1.toString()}
      <br />
      <br />
      isUndefined(undefined); // {result2.toString()}
      <br />
      <br />
      isUndefined(null); // {result3.toString()}
    </code>
  </pre>
);
```

### API

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

### Params

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

### Returns

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