Socket
Book a DemoInstallSign in
Socket

@okiba/event-manager

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@okiba/event-manager

Centralized event management

latest
Source
npmnpm
Version
2.1.1
Version published
Weekly downloads
0
-100%
Maintainers
3
Weekly downloads
 
Created
Source

Okiba / EventManager

A custom events management system

Installation

npm i --save @okiba/event-manager

Or import it directly in the browser

<script type="module" src="https://unpkg.com/@okiba/event-manager/index.js"></script>

Usage

import EventManager from '@okiba/event-manager'

Untranspiled code 🛑

Okiba UI packages are not transpiled, so don't forget to transpile them with your favourite bundler. For example, using Babel with Webpack, you should prevent imports from okiba to be excluded from transpilation, like follows:

{
  test: /\.js$/,
  exclude: /node_modules\/(?!(@okiba)\/).*/,
  use: {
    loader: 'babel-loader',
    options: {
      presets: ['@babel/preset-env']
    }
  }
}

Submodules:

EventManager

A singleton to manage centralized event listeners

subscribedEvents, hasListeners, subscribe, unsubscribe, update, on, off, emit, clear, destroy

AbstractHandler

A base class that defines a global event handler interface

module:AbstractHandler, eventCallback, listen, unlisten, dispatch

EventHandler

An handler class aimed to centralize a native browser event listener

listen, unlisten, dispatch

RAFHandler

An handler class aimed to centralize a requestAnimationFrame

nextFrame, listen, unlisten

FAQs

Package last updated on 08 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts