Skip to content

Project providing services implemented as singleton class instances. They abstract and prevent the process of creating multiple event listeners for common browser events. These services are particularly useful for managing events that are likely to be listened to by many components.

License

Notifications You must be signed in to change notification settings

toosoon-dev/toosoon-events

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TOOSOON EVENTS

Project providing managers implemented as singleton class instances. They abstract and prevent the process of creating multiple event listeners for common browser events. These managers are particularly useful for managing events that are likely to be listened to by many components.

Installation

Yarn:

$ yarn add toosoon-events

NPM:

$ npm install toosoon-events

Usage

import PointerManager, { Pointer } from 'toosoon-events/pointer';

function onPointerStart(pointers: Pointers[]) {
  // ...
}

PointerManager.on('start', onPointerStart);

function dispose() {
  PointerManager.off('start', onPointerStart);
}

Managers

KeyboardManager

PointerManager

RafManager

ResizeManager

ScrollManager

License

MIT License, see LICENSE for details.

About

Project providing services implemented as singleton class instances. They abstract and prevent the process of creating multiple event listeners for common browser events. These services are particularly useful for managing events that are likely to be listened to by many components.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published