(val, space)
| 536 | } |
| 537 | |
| 538 | function representObj(val, space) { |
| 539 | let string = typeof val.toString == "function" && val.toString(), m |
| 540 | if (!string || /^\[object .*\]$/.test(string)) |
| 541 | return representSimpleObj(val, space) |
| 542 | if (val.call && (m = string.match(/^\s*(function[^(]*\([^)]*\))/))) |
| 543 | return span("fun", m[1] + "{…}") |
| 544 | let elt = span("etc", string) |
| 545 | elt.addEventListener("click", () => expandObj(elt, "obj", val)) |
| 546 | return elt |
| 547 | } |
| 548 | |
| 549 | function constructorName(obj) { |
| 550 | if (!obj.constructor) return null |
no test coverage detected