mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 13:04:30 -08:00
show object constructor name in value explorer
This commit is contained in:
@@ -121,13 +121,17 @@ export const header = object => {
|
||||
} else if(has_custom_toString(object)) {
|
||||
return object.toString()
|
||||
} else {
|
||||
const prefix =
|
||||
(object.constructor.name == null || object.constructor.name == 'Object')
|
||||
? ''
|
||||
: object.constructor.name + ' '
|
||||
const inner = displayed_entries(object)
|
||||
.map(([k,v]) => {
|
||||
const value = stringify_for_header(v)
|
||||
return `${k}: ${value}`
|
||||
})
|
||||
.join(', ')
|
||||
return `{${inner}}`
|
||||
return `${prefix} {${inner}}`
|
||||
}
|
||||
} else if(typeof(object) == 'function') {
|
||||
// TODO clickable link, 'fn', cursive
|
||||
|
||||
Reference in New Issue
Block a user