massiveinteractive/msignal — pull request #1 by misprintt (2012-08-17 02:34:49+00:00)
Title: EventSignal.onType() - support for non enum event types, strict equality on enum event types

### Adds support for non enum event types

E.g.

var event = new EventSignal();

supports:

event.add(handler).forType("foo");

And will only call handler if string value == `foo`

> note: any non-enum type will do basic equality check (a == b)

### Support for wildcare or strict equality on enum values with parameters

E.g.

var event = new EventSignal();
event.add(handler).forType(SomeEnum.changed("foo"))

will only execute listener if `changed("foo")` is dispatched

and

event.add(handler).forType(SomeEnum.changed(null))

will execute listener for any value (`changed("foo")`, `changed("bar"), `changed(null))