ajacksified/Mediator.js — pull request #34 by tbusser (2014-09-02 08:37:25+00:00)
Title: Fix infinite mediator.once

This fixes issue #29 which outlines a situation where a callback method
would get called an infinite number of times if the callback publishes
to the same channel that caused the callback to be triggered in the
first place.

By first checking if the subscriber will be called and decreasing its
call counter by one we can remove the subscriber from the channel before
the callback method is called. This will prevent the infinite loop from
occurring.