code: function Action(t) {
  
    var evt = d3.dispatch('finish');
    var action = t;
    if (t.enter === undefined && !(typeof(t) === 'function' && t.prototype.enter !== undefined)) {
      action = {
        enter: t
      }
    }
  
    return d3.rebind(action, evt, 'on', 'finish');
  
  }
docs: basic action t can be a function or an object if is a function it's called on ``enter`` event if t is an object with enter/exit/update methods they're called on state changes