ozantunca/DispatcherJS

Allow for multiple instances

Closed this issue · 4 comments

Hey this library looks pretty promising. Would it be possible to give the option of having multiple instance of the dispatcher? In my use case, there are several independent applications running concurrently and it'd be kind of bad if they mixed together.

Hey thanks for your interest. I thought that wouldn't be needed but if you say so I will be adding that feature too shortly.

Thanks!

You can now have seperate instances of dispatcher by initializing it like this:

  var Dispatcher = require('dispatcherjs')
    , dispatcher = new Dispatcher()
    , dispatcher2 = new Dispatcher();

Cool, thanks!