A node.js, my module became too big, so I split it into several smaller (sub) modules.
I copy and paste all the relevant objects into each of the submodules, which now look like
var SOME_CONSTANT = 10; function my_func() { etc... };
Now I want to export everything to each submodule in bulk, without explicitly exports.SOME_CONSTANT = SOME_CONSTANT
million times (I believe that both are ugly and error prone).
What is the best way to achieve this?
source share