text: function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  import { once } from './utils';
  export var Events = function Events(config) {
    var _this = this;
  
    _classCallCheck(this, Events);
  
    this.start = null;
    this.interrupt = null;
    this.end = null;
  
    if (config.events) {
      Object.keys(config.events).forEach(function (d) {
        if (typeof config.events[d] !== 'function') {
          throw new Error('Event handlers must be a function');
        } else {
          _this[d] = once(config.events[d]);
        }
      });
    }
  };
  export default Events;