A I2C slave isn't that hard to implement, see e.g. https://github.com/JDat/AtTiny-I2C-master-slave-USI/blob/master/usi_i2c_slave.c
I'd say it can be converted to Javascript.
@maze1980 started
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.
A I2C slave isn't that hard to implement, see e.g.
https://github.com/JDat/AtTiny-I2C-master-slave-USI/blob/master/usi_i2c_slave.c
I'd say it can be converted to Javascript.