dirsp-ps2ocaml is an executable that translates the restricted subset of JavaScript called "ProScript" into OCaml.
dirsp-ps2ocaml
Online documentation is available at Translating ProScript into OCaml