I have this simple node module
module.exports = {
func1: () => {
},
func2: () => {
}
}
Now when I wanted to refer to func1
inside func2
I used to do this.func1
before ES6
So now as the this
is different in ES6. Is it correct that I have to do module.exports.func1
inside func2
?
So, it's going to be?
func2: () => {
module.exports.func1();
}