General Transpiler implemented in JavaScript