(value: any, type: string)
| 8 | * @param type 预期类型 |
| 9 | */ |
| 10 | export function typeChecking(value: any, type: string): boolean { |
| 11 | // 直接使用 toString.call(value) 在 ie 会下报错 |
| 12 | return Object.prototype.toString.call(value) === type |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * 检测 value 是否为函数 |
no outgoing calls
no test coverage detected