Below code doesn't work. When I try to use this module it hasn't got these methods. Looks like I'm returning wrong object?
define([
'jquery'
], function($ ){
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
};
$.unsubscribe = function() {
o.off.apply(o, arguments);
};
$.publish = function() {
o.trigger.apply(o, arguments);
};
return o;
});