A simple PubSub in JavaScript