* Check if value is primitive * //判断数据类型是否是string,number,symbol,boolean
(value)
| 48 | * //判断数据类型是否是string,number,symbol,boolean |
| 49 | */ |
| 50 | function isPrimitive(value) { |
| 51 | //判断数据类型是否是string,number,symbol,boolean |
| 52 | return ( |
| 53 | typeof value === 'string' || |
| 54 | typeof value === 'number' || |
| 55 | // $flow-disable-line |
| 56 | typeof value === 'symbol' || |
| 57 | typeof value === 'boolean' |
| 58 | ) |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Quick object check - this is primarily used to tell |
no outgoing calls
no test coverage detected