Write Python style class in Nodejs