I created a javascript class as follow:
var MyClass = (function() { function myprivate(param) { console.log(param); } return { MyPublic
bob.js has nice syntax to define JavaScript namespace:
bob.ns.setNs('myApp.myMethods', { method1: function() { console.log('This is method 1'); }, method2: function() { console.log('This is method 2'); } }); //call method1. myApp.myMethods.method1(); //call method2. myApp.myMethods.method2();