Simple PubSub eventing via proxied Backbone.Events. Best used with Browserify! https://github.com/substack/node-browserify.
npm install simple-pubsub
– on
– off
– trigger
– once
– listenTo
– stopListening
– listenToOnce
var PubSub = require('simple-pubsub')
PubSub.on('event', function (params) {
console.log('Hi!', params.name)
})
PubSub.trigger('event', {
name: 'Shostakovich'
})
PubSub.off('event')
npm install -g grunt-cli
npm install
grunt test
- Backbone.js
- Underscore.js