mroderick/PubSubJS — pull request #33 by d3x7r0 (2013-10-28 17:11:56+00:00)
Title: Allow unsubscribe to be called on a listener

I found a small issue related to issue #26 where calling unsubscribe on a listener would prevent some of the registered listeners from getting the event.

I found a way to fix this by storing a copy to use during delivery instead of iterating over the array of listeners that can change at any time.

This allows a person to setup a listener that only fires once for example.