以下 API 为已通过测试,处于待合并状态。
描述:检测输入的值属于什么类型。
$whichType(val: any): String;参数:
- val: 需要检测的值。
返回值:
- 值的类型,有: "string", "number", "null", "undefined", "boolean", "symbol", "function", "object", "regexp", "array"。
Examples
$whichType('') // 'string'
$whichType({}) // 'object'