Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including FSM with all npm packages installed. Try it out:

var fsm = require("FSM")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

FSM v1.0.3

A minimal finite state machine (FSM) for Javascript.

Finite State Machine (FSM)

Build Status

A minimal finite state machine (FSM) for Javascript.


Using bower

bower install --save FSM

Using npm

npm install --save FSM


To build the library you'll need to use Grunt. First install the required node modules (grunt-cli must be installed):

git clone
cd FSM
npm install

Then run grunt build to build the project.


To test the library you'll need to use Jasmine. First install Jasmine:

git clone
mkdir FSM/jasmine
mv jasmine/dist/ FSM/jasmine
cd FSM/jasmine

Then open FSM/SpecRunner.html in a browser to run the tests.

Alternatively you can use grunt jasmine to run the tests from the command line.


Full documentation is available at

Browser support

  • Chrome
  • Firefox
  • IE9+


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free