Javascript implementation of the Publish/Subscribe pattern.