I've been playing around with node and calling universe subroutines and got it working. There's quite a bit of rough edges but I think it's an interesting route to make a wrapper for intercall that works with node.
The C code is a mess because I don't know C but I think it would be much easier had I not chosen a function that takes variadic arguments like ic_subcall. This means that it would be relatively straightforward to wrap most of the intercall functions for use with javascript.
Not that I'm going to! but maybe someone will enjoy this!
I'd also be happy to hear about any improvements I can make/readings you recommend to get a better handle on C.