(val, space)
| 504 | } |
| 505 | |
| 506 | function represent(val, space) { |
| 507 | if (typeof val == "boolean") return span("bool", String(val)) |
| 508 | if (typeof val == "number") return span("number", String(val)) |
| 509 | if (typeof val == "string") return span("string", JSON.stringify(val)) |
| 510 | if (typeof val == "symbol") return span("symbol", String(val)) |
| 511 | if (val == null) return span("null", String(val)) |
| 512 | if (Array.isArray(val)) return representArray(val, space) |
| 513 | else return representObj(val, space) |
| 514 | } |
| 515 | |
| 516 | function representArray(val, space) { |
| 517 | space -= 2 |
no test coverage detected