Skip to content

Simple PubSub eventing via proxied Backbone.Events.

License

Notifications You must be signed in to change notification settings

laget-se/simple-pubsub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple PubSub

Simple PubSub eventing via proxied Backbone.Events. Best used with Browserify! https://github.com/substack/node-browserify.

Installation

  • npm install simple-pubsub

API

http://backbonejs.org/#Events

onofftriggeroncelistenTostopListeninglistenToOnce

Example

var PubSub = require('simple-pubsub')

PubSub.on('event', function (params) {
  console.log('Hi!', params.name)
})

PubSub.trigger('event', {
  name: 'Shostakovich'
})

PubSub.off('event')

Tests

  • npm install -g grunt-cli
  • npm install
  • grunt test

Thanks

  • Backbone.js
  • Underscore.js

About

Simple PubSub eventing via proxied Backbone.Events.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published