code: function bindEvent(p1, p2) {
    if (typeof p1 === "function") {
      return decorate(p1, BindToEventDecorator());
    } else if (typeof p1 === "object" && typeof p2 === "function") {
      return decorate(p2, BindToEventDecorator(p1.event, p1.target, p1.listenIn, p1.removeIn));
    } else {
      throw new Error("bindEvent must take: (function), or a ([object], function)")
    }
  }
docs: /*
  Decorates a function with configurations for automatically binding to an event.
  
  @param p1 - If this is a function it will be decorated with default options and p2 is ignored. Otherwise this can be
  an object which fine tunes the binding.
  @param p2 - If p1 is an object then this will be the function to bind to.
  
  @returns {function} Decorated function which wraps the input function.