Python Method Chaining Javascript Compiler