"use strict";

exports.__esModule = true;
exports.chainEventHandlers = chainEventHandlers;
/**
 * Chain event handlers.
 *
 *
 * @returns an event handler which calls all given handler by order while skipping undefined handlers.
 */
function chainEventHandlers() {
  for (var _len = arguments.length, handlers = new Array(_len), _key = 0; _key < _len; _key++) {
    handlers[_key] = arguments[_key];
  }
  return event => handlers.filter(i => i).forEach(handler => handler(event));
}
//# sourceMappingURL=ChainEventHandlers.js.map