I've just linked this forum post. I'll have a think about a nice way of doing it - the thing really is finding a way of doing it that uses up very little memory. Some of the boards without much flash have a lot of trouble getting Espruino in at the moment (literally ~300 bytes free or so) - normally I'd just not include non-vital functions on those boards - but with something like this, modules that used the function would just refuse to work of the function didn't exist.
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.
There is an issue open for this (not specifically on I2C): https://github.com/espruino/Espruino/issues/119
I've just linked this forum post. I'll have a think about a nice way of doing it - the thing really is finding a way of doing it that uses up very little memory. Some of the boards without much flash have a lot of trouble getting Espruino in at the moment (literally ~300 bytes free or so) - normally I'd just not include non-vital functions on those boards - but with something like this, modules that used the function would just refuse to work of the function didn't exist.