title: Check for function called
body: <p>Just wondering if there is anyway to fire some code when a function is called, without adding the code to the function, for example:</p>
  
  <pre><code>function doSomething(){
      //Do something
  }
  
  //Code to call when doSomething is called
  </code></pre>