mjstahl / stated

Simply put state management for your JavaScript application
https://www.npmjs.com/package/@mjstahl/stated
MIT License
4 stars 0 forks source link

Add 'canEnter' and 'canLeave' properties #7

Closed mjstahl closed 5 years ago

mjstahl commented 5 years ago

These function shall be defined on a state, and will be called when entering or leaving that state.

The function shall take the Stated object as the only argument.

If either function returns false, they shall not perform the respective functions (not enter, not leave)