Skip to content

Instantly share code, notes, and snippets.

@ronnyandre
Created March 8, 2012 13:33
Show Gist options
  • Save ronnyandre/2001003 to your computer and use it in GitHub Desktop.
Save ronnyandre/2001003 to your computer and use it in GitHub Desktop.
JavaScript: Sexy PubSub
var o = $( {} );
$.subscribe = o.on.bind(o);
$.unsubscribe = 0.off.bind(o);
$.publish = o.trigger.bind(o);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment