title: simplest way to use event emitter in ES6
body: <p>This is my current implementation of an event emitter.</p>
  
  <pre><code>class Table {
  
    set onDiscard(cb) {
      this._onDiscard = cb;
    }
  
    notifyDiscard(s) {
      if (this._onDiscard) {
        this._onDiscard(s);
      }
    }
  }
  </code></pre>
  
  <p>In the case of having multiple events this gets a burden.</p>
  
  <p>What library/feature/implementation can I use so I can simplify this to a single line.</p>