You could use nested functions:
module.exports = function main(args) {
function myFirstHelper() {
// ...
return result;
}
function mySecondHelper() {
// ...
return result;
}
// ...
return result;
};
... and there would be no need to pass args
since it would be accessible to those nested functions. Yet there's no reason to worry about this unless your module is very large.
The visibility/scope of something only tends to be problematic if the visibility/scope is much wider than its applicability.
For example, a variable declared at the top of a massive function might be a tripping point and a source of confusion and maintenance issues if it is declared/defined at the very top but only used by 3 lines of code towards the bottom. In that case, the visibility of the variable is significantly wider than its applicability, and therefore the reader must kind of keep it in account when tracing through the function for a much longer period of time than it is actually used, increasing the intellectual overhead. Of course, massive functions also tend to be a smell, but that's a different matter.
So here you have functions which are visible within the module. If the module is small and consists mostly of code using these functions, then the visibility/scope of these functions is not significantly wider than their applicability/usage within the module.
That said, nested functions are handy even for pure organizational purposes if you haven't encountered them before, and precisely because of how they allow you to avoid polluting an outer scope. So they might be a handy alternative to consider in this kind of case. But don't worry too much about the scope of a function (or anything) which is already pretty narrow.