Functional programming extension for scalable JavaScript application