title: Bind function call in object
body: <p><strong>Goal</strong>: Execute function when function -defined in object- is called</p>
  <p>Example:</p>
  <pre><code>var obj = {
      endUpdate: function(){
         ... (async stuff from library, cannot modify this code)
      }
  }
  </code></pre>
  <p>I want to write something like this, to know when <em>endUpdate</em> has been called</p>
  <pre><code>obj.on('endUpdate', function(){
      // do stuff here when &quot;endUpdate&quot; in above object is called
  })
  </code></pre>