Use something like [javy](https://github.com/suborbital/javy) to make it possible to write Trinity modules in JavaScript.