Example mediator in javascript, using require.js, tested with Jasmine.