title: Javascript to parse string with 'function'
body: <p>I have following string which needs to be parsed using JS.</p>
  
  <pre><code>function () {\n     MyClass.prototype.doSomethingFunction();\n       5-6 lines of coding\n  }
  </code></pre>
  
  <p>I tried parsing it, trimming whitespaces and newlines but nothing worked for me. Please let me know how can I get function name (doSomethingFunction) from the above string.</p>
  
  <p>How I'm getting this string:</p>
  
  <p>I have a queue where my functions are stored. Later in time my code picks a function from this queue (some logic here) and execute them. It works perfectly ok for me. But I just want to print the name of the function out of it! It's like '(classOBJ.myFunctionsQueue[n])()' is used to execute a function which is stored at nth location in myFunctionsQueue array. Make sense or I'm doing something wrong in here?</p>
  
  <p>Thanks
  MANN</p>