toosoon-events
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

TOOSOON EVENTS

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.

Installation

Yarn:

$ yarn add toosoon-events

NPM:

$ npm install toosoon-events

Usage

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

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

pointer.on('start', onPointerStart);

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

Services

keyboard

pointer

raf

resize

scroll

License

MIT License, see LICENSE for details.

Package Sidebar

Install

npm i toosoon-events

Weekly Downloads

7

Version

3.0.0

License

MIT

Unpacked Size

29.8 kB

Total Files

18

Last publish

Collaborators

  • arnaudrocca