In this wiki page I see that addons can require custom js files.
Let’s imagine the situation:
In file “mycooljs.js” in folder content/js/ I have this code:
var myobj = {
name: "test",
func: function () {
return name in this;
}
}
var myobj = {
name: "test",
func: function () {
return name in this;
}
}
var myobj2 = {
callback: false,
callback_func: function callback_func(callback, statement) {
//code
}
}
I must write module.exports = myobj; module.exports = myobj2; or module.exports = {myobj, myobj2}; or module.exports = [myobj, myobj2]?
module.exports = {
myobj: ...
myobj2: ...
}
```
or
```
var myobj = {};
var myobj2 = {};
module.exports = {myobj: myobj, myobj2: myobj2};
```
Basically you can do whatever you want, just make sure that any data you want to expose is in module.exports