A Javascript implementation of Trif