I noticed that the auto-completion tab in IDE is able to output more fields than a call to eg.: Object.getOwnPropertyNames(Bangle) Object.getOwnPropertyNames(Bangle.__proto__)
Specifically, some object-like fields: Bangle.on Bangle.removeListener etc
Similarly for a Promise object, I do not see the .then function as child object. How can I get full listing via javascript?
The auto-complete is able to show all of these fields from a promise instance:
>p.
constructor apply
bind call
replaceWith catch
then clone
emit hasOwnProperty
length on
removeAllListeners removeListener
toString valueOf
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I noticed that the auto-completion tab in IDE is able to output more fields than a call to eg.:
Object.getOwnPropertyNames(Bangle)
Object.getOwnPropertyNames(Bangle.__proto__)
Specifically, some object-like fields:
Bangle.on
Bangle.removeListener
etcSimilarly for a Promise object, I do not see the
.then
function as child object. How can I get full listing via javascript?The auto-complete is able to show all of these fields from a promise instance:
How do I get these items into a javascript list?