You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

eventhandler.js

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eventhandler.js

![Bower version](https://img.shields.io/bower/v/EventHandler.js.svg) [![npm version](https://img.shields.io/npm/v/eventhandler.js.svg)](https://www.npmjs.com/package/eventhandler.js) [![Build Status](https://travis-ci.org/murrayju/EventHandler.js.svg?br

Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

EventHandler.js

Bower version npm version Build Status Coverage Status devDependency Status

Sauce Test Status

A simple class for handling events

Quick start

Several options are available to get started:

  • Download the latest release.
  • Clone the repo: git clone https://github.com/murrayju/EventHandler.js.git.
  • Install with Bower: bower install EventHandler.js.
  • Install with npm: npm install eventhandler.js.

Example

var evt = new EventHandler();

// Register a listener for this event
var handler = evt.on(function (someArg) {
  console.log('Event fired with arg: ' + someArg);
});

// Fire the event
evt.fire('test data');

// Unregister the listener when no longer needed
handler.off();

Credits

BrowserStack
A big thanks to BrowserStack for providing automated cross-browser testing!

Keywords

js

FAQs

Package last updated on 19 Jun 2015

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