A JavaScript code generator