add SPI support for JS