I am a bit confused with the code below, can we create class in js this way?
module.exports = function testname(paramas){
testname.test = function(req, res){
//some code here
}
return testname;
}
should not we use this.test instead of function name.test?