I'm editing the main post, originally I was checking a way to dynamically call function name beginning from a couple of strings. Specifically I had a prefix and a variable string based on a text list. Actually I get this words by a table, my purpose is create filters for the datatable jquery object. However I solved with the eval method like this:
var fn = 'my_foo';
eval(fn+'()');
I really have to say I thought to have fixed my issue, but eval is a bad practise for security risks and majorly I'm still not able to test if dynamic function name exists. I have tried $isFunction, window[myname], typeof myname === 'function', nothing of the constructs above works. I also have tried $ instead of window since I'm using jquery and webpack. I'm driving crazy please help.
FINAL: OK I solved, it's hard to explain in my case. I was not able to see the function cause of scope, and I have read tons of example across the internet making several try. Nothing was working for me. Only one result was fitting to my case, I lost the link was here stackoverflow, a guy has described my same situation he just can't find the scope of the target function cause of closures. My scope is the same, I have an index.js, function1.js function2.js function3.js in which every functions are individually exposed with "export" and individual function are used in the peers codes with a prefix like fun1. fun2. fun3. Well, I was working as example in the same function3 where mytarget and mydynfunctioncaller lives. I have tried to use window[fun3.mytarget] but nothing has got succes. How I have fixed? I just have created in example fun1.myrepowithcaseofinside and called it by the function in fun3. That's all.