Design patterns in Javascript: Publish-Subscribe or PubSub