I think x instanceof Pin will work?
x instanceof Pin
Although perhaps checking "object"==typeof x is better?
© Espruino, powered by microcosm.
Report a problem