Skip to content

Instantly share code, notes, and snippets.

@kapooostin
Forked from benhowdle89/foo.js
Last active August 29, 2015 14:13
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 kapooostin/600f9ab87d3b600ed6ac to your computer and use it in GitHub Desktop.
Save kapooostin/600f9ab87d3b600ed6ac to your computer and use it in GitHub Desktop.
var _vent = require('./vent.js').shared();
_vent.trigger('blah');
var Backbone = require('backbone'); // or any Event/PubSub lib you prefer
var _vent = null;
module.exports = {
shared: function () {
if (!_vent) {
_vent = _.extend({}, Backbone.Events);
}
return _vent;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment