# consolidated-events

Manage multiple event handlers using few event listeners.

# consolidated-events

Manage multiple event handlers using few event listeners.

## Example

```js
import { addEventListener, removeEventListener } from 'consolidated-events';

const listenerId = addEventListener(
  window,
  'scroll',
  () => { console.log('scrolling') },
  { passive: true }
);

...

removeEventListener(window, 'scroll', listenerId, { passive: true });
```

Add basic example to readme
Add basic example to readme

Looking at this, I'm thinking that I might want to change the API a bit.
Mostly by having addEventListener return an object that has everything
that removeEventListener needs to remove the eventListener. So, it would
instead look like this:

```js
const listenerHandle = addEventListener(
  window,
  'scroll',
  () => { console.log('scrolling') },
  { passive: true }
);

...

removeEventListener(listenerHandle);
```
