stance
v1.0.2
Published
Simple finite state machine for data managment
Downloads
5
Readme
Stance
Simple finite state machine for data managment.
GitHub: link
NPM: link
Install via NPM
npm install --save stance
Usage
import Stance from 'stance';
const stance = new Stance(['a', 'b']);
console.log(stance.is('a')); // true
console.log(stance.is('b')); // false
stance.to('b');
console.log(stance.is('a')); // false
console.log(stance.is('b')); // true