Use string as functions
get an string or external file string and use it´s contents as functions
by Marcel Kohls
JavaScript
// as I do not recommend to use eval because it´s dangerous and can open issues to hackers, sometimes people need it.
var externalString = "funcs={myFunction:function(param){console.log(param);} , otherFunction:function(){x=10+10; return x;}};"
var functions=eval(externalString);
functions.myFunction('test'); // this writes to console
alert(functions.otherFunction());