Nice. Though the consumption of scotch on this end may not add clarity to my melted brain output!
Right, so why not have an outputNumber block that can only be 1 to the number set? Once the user has set the number of outputs and blurred away from the input, it is available to you (as the node author) via JQuery. Now you've eliminated one of your potential errors. The user of the node cannot select an invalid output node number. Doesn't that help? Certainly would make it easier for novice users I think?
OK, I re-read your code and it seems as though the scotch is actually helping because I can see that you are using template literal features in some cases (e.g. embeded variables that you want evaluated inside the string). But not in other cases. I'm a little anal about such things and I would use simple strings unless I needed something more.
Your code:
var code = `if(${functionName}(${outputNumber})) {\n`;
code += ` node.send([ ${outputArray} ]);\n`;
code += `}\n`;
My anal code:
var code = `if(${functionName}(${outputNumber})) {\n`;
code += ` node.send([ ${outputArray} ]);\n`;
code += "}\n";
The other potential problem back-ticks AKA "Template Literals" is that they are very new feature in JavaScript and likely wont work for one of those hangouts using an old version of Node.JS - it was first introduced into the JS spec in 2016 I think. Not sure what version of Node.JS it was implemented. However, people should be using at least Node v8.x which does support them so that shouldn't be an issue.
Just ignore me.