isNaN([1,2])... I thought I had 'tested' that... but may be on the wrong plaform... as said. Going for typeof (=== "number") would probably be a better choice, even better than checking for array.
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.
Oops. Try with:
https://gist.githubusercontent.com/gfwilliams/da8f09f91c8d0011cbae/raw/72d4e9e462ccff66703d47797b350694357fa56d/ADS1X15.js
@allObjects, the
if (!isNaN(channelSpec))
test doesn't work properly in Espruino. Looks like there's a bug there that meansisNaN([1,2])
is false.edit: just fixed it, but it'll only get into the 1v81 release