You can put all of your methods into an object.
function myMethod(text) {
console.log(text);
}
var methods = {myMethod: myMethod, ... };
module.init = function (name) {
// here I want to do something like
// eval(name)("hello");
// using square bracket notation.
if(methods.hasOwnProperty(name)){
methods[name].call(this, "hello");
}
else {
// some error that the method does not exist
}
};