consolidated-events
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/consolidated-events package

2.0.2 • Public • Published

consolidated-events Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

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();

Readme

Keywords

Package Sidebar

Install

npm i consolidated-events

Weekly Downloads

894,422

Version

2.0.2

License

MIT

Unpacked Size

40.5 kB

Total Files

23

Last publish

Collaborators

  • lencioni