-
-
Save kapooostin/600f9ab87d3b600ed6ac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _vent = require('./vent.js').shared(); | |
_vent.trigger('blah'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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