jscl icon indicating copy to clipboard operation
jscl copied to clipboard

More information about javascript objects

Open orodley opened this issue 11 years ago • 2 comments

At the moment, printing a javascript object always results in #<javascript object>. It would be nice to have the fields printed: something like #<javascript object: x = 1, y = 2> for an object with an x property of 1 and a y property of 2, for example.

This is a low priority feature, of course.

orodley avatar Jul 17 '14 03:07 orodley

Or at least in the describe function.

davazp avatar Jul 21 '14 15:07 davazp

Keys already appear in description:

CL-USER> (describe #j:console)
#<JS-OBJECT [object Object]>
Class: #<builtin-in-class JSCL::JS-OBJECT>
Signature: [object Object]
Keys: (assert clear count countReset debug error info log table trace warn dir dirxml group groupCollapsed groupEnd time timeLog timeEnd exception timeStamp profile profileEnd)

Good enough?

For values, I would implement an INSPECT function.

mmontone avatar Sep 01 '22 14:09 mmontone