Open davestewart opened 7 years ago
Rather than fsm.do('foo') a more expressive syntax would be something like fsm.foo().
fsm.do('foo')
fsm.foo()
However, I don't want to pollute the main StateMachine instance, so what about populating an actions object?
var a = fsm.actions if(a.next()) { a.reset() }
Should be simple to implement, maybe even as a helper.
Rather than
fsm.do('foo')
a more expressive syntax would be something likefsm.foo()
.However, I don't want to pollute the main StateMachine instance, so what about populating an actions object?
Should be simple to implement, maybe even as a helper.