consolidated-events

Manage multiple event handlers using few event listeners

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
consolidated-events
4422.0.24 years ago6 years agoMinified + gzip package size for consolidated-events in KB

Readme

!Build Statustravis-svgtravis-url !dependency statusdeps-svgdeps-url !dev dependency statusdev-deps-svgdev-deps-url !Licenselicense-imagelicense-url !Downloadsdownloads-imagedownloads-url
!npm badgenpm-badge-pngpackage-url
Manage multiple event handlers using few event listeners.

Example

import { addEventListener } from 'consolidated-events';

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

...

removeEventListener();