# Global

##

### Methods

#### typeOf(value, typeopt) → {Boolean|String}

Source:
  - typeOf.js, line 22
Version:
  - 1.0.0

检查某个数据的数据类型

输入值 | 输出
--- | ---
123 | Number
'abcdef' | String
true | Bollean
[1, 2, 3, 4] | Array
{name:'wenzi', age:25} | Object
console.log('this is function') | Function
undefined | Undefined
null | Null
new Date() | Date
/^[a-zA-Z]{5,20}$/ | RegExp
new Error() | Error

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`value` | * |  | 输入值
`type` | String | <optional> | 需要核对的数据类型，不填的时候则返回数据类型

##### Returns:

- 返回首字母大写的数据类型（ex：Number）或者布尔值

Type
  Boolean | String