public
Last active

Faux pubsub. Could also use jQuery event binding if you rather.

  • Download Gist
crunchy_pubsub.js
JavaScript
1 2 3 4 5 6
crunch.pubsub = _.extend({}, Backbone.Events);
 
// Hide backbone implementation by aliasing
crunch.pubsub.publish = crunch.pubsub.trigger;
crunch.pubsub.subscribe = crunch.pubsub.bind;
crunch.pubsub.unsubscribe = crunch.pubsub.unbind;

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.