javascript-state-machine icon indicating copy to clipboard operation
javascript-state-machine copied to clipboard

A javascript finite state machine library

Results 74 javascript-state-machine issues
Sort by recently updated
recently updated
newest added

I wasn't able to find any typescript typings for this lib... May I help in writing a suitable d.ts? Thanks !

FR

I downloaded V3, but can't run, showing: TypeError: StateMachine is not a constructor But when i replace the file with V2, it is running properly.

v3.0
QUESTION

Fix: observeEvents function will wait until a promise (or an async fuction) result before return. Support for async/await functions

codepen for this: https://codepen.io/xiekw2010/project/editor/XLpBjL Within the onAfterTransition oberserver ``` coder.disabled = fsm.cannot("shenpi"); // This should be false!!! ```

I would like to be able to prevent certain transitions by adding logic to check the data attribute in `onBeforeTransition`. It's not immediately clear how best to update the code...

If I want to decide between two transitions on entering a state, I am unable to call a transition from inside any lifecycle event. Say I have a very simple...

Can that be disabled? If I am setting existing state, machine is already in, why is there event fired? Can that behaviour be disabled? I can see I got there...

I may be using the library wrong, but am upgrading from 2.x. Say I have the following (made up) FSM: ```js { init: 'index', transitions: [ { name: 'index', from:...

I'm using state machine for telegram bot, when webhook received message from telegram i get user state from store (redis), next creating state machine: ``` //example of user state from...

According to the [Asynchronous Transitions doc](https://github.com/jakesgordon/javascript-state-machine/blob/master/docs/async-transitions.md) > Returning a Promise from a lifecycle event will cause the lifecycle for that transition to pause. It can be continued by resolving the...