js-signals 1.0.0

A custom event/messaging system for JavaScript
js-signals is similar to an Event Emitter/Dispatcher or a Pub/Sub system.

There's a difference that each event type, there's a controller, which doesn't rely on strings to broadcast/subscribe to events.

The intention of this library is to be a "small brick" that can be used together with other libraries and frameworks, helping people to develop evented applications easily.

Main features:

  • Doesn't rely on strings for subscribing/publishing to a event type.
  • Trying to dispatch or listen to an event type that doesn't exist throws errors instead of failing silently which helps to identify errors early.
  • Code completion friendly.
  • Arbitrary number of parameters to event handlers.
  • Easy control of the event broadcaster and subscriber, avoiding that the wrong objects reacts to the event.
  • Convenience methods that usually aren't present on other implementations of the observer pattern like:
  • Enable/disable event dispatching per event type.
  • Remove all event listeners attached to a specific event type.
  • Option to automatically remove listener after first execution.
  • Option to bind an execution context to the event handler, avoiding scope issues.
  • Remove/detach anonymous listener.
  • Favor composition over inheritance.
  • Easy to identify which event types the object dispatch.

last updated on:
December 4th, 2012, 11:57 GMT
license type:

MIT License

developed by:
Miller Medeiros
operating system(s):
Windows / Linux / Mac OS / BSD / Solaris
C: \ Development Tools \ Other Libraries
Download Button

In a hurry? Add it to your Download Basket!

user rating



Rate it!

Add your review!