ifandelse/machina.postal — pull request #4 by benwhite-deltas (2014-06-30 11:17:40+00:00)
Title: Dependency injected channels

I would find it useful if this could be used to pass the input/output channels in to the constructor, rather than having them constructed based on the Fsm namespace.

For example:

myFsm = new machina.Fsm({
handlerBus: postal.channel('myHandlers'),
eventBus: postal.channel('myListeners'),
initialState: 'first',
states: {
// ...
}
}

Does this seem useful? I'd be happy to develop a solution implementing this and submit as a pull request if it does.