Python Method Chaining Javascript Compiler Code