(v: unknown, asRaw = true)
| 151 | } |
| 152 | |
| 153 | function formatValue(v: unknown, asRaw = true) { |
| 154 | if (typeof v === 'number') { |
| 155 | return ['span', numberStyle, v] |
| 156 | } else if (typeof v === 'string') { |
| 157 | return ['span', stringStyle, JSON.stringify(v)] |
| 158 | } else if (typeof v === 'boolean') { |
| 159 | return ['span', keywordStyle, v] |
| 160 | } else if (isObject(v)) { |
| 161 | return ['object', { object: asRaw ? toRaw(v) : v }] |
| 162 | } else { |
| 163 | return ['span', stringStyle, String(v)] |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | function extractKeys(instance: ComponentInternalInstance, type: string) { |
| 168 | const Comp = instance.type |
no test coverage detected