Skip to content

Instantly share code, notes, and snippets.

@ronnyandre
Created March 8, 2012 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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