whatisgithub

What is emitter-fsm?

yyx990803/emitter-fsm — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2014-06-10

7JavaScriptAudience · developerComplexity · 2/5DormantSetup · easy

In one sentence

A lightweight JavaScript state machine library built on Node's EventEmitter, letting you define states and transitions and get notified when the state changes.

Mindmap

mindmap
  root((emitter-fsm))
    Inputs
      Defined states
      Events
    Outputs
      State transitions
      Emitted change events
    Use Cases
      Form wizards
      Turn-based games
      Auth flows
    Tech Stack
      JavaScript
      Node.js EventEmitter

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Model a step-by-step form wizard where each step is a state with clear transitions.

USE CASE 2

Build turn-based game logic with predictable state transitions instead of scattered conditionals.

USE CASE 3

Manage an authentication flow with states like logged-out, logging-in, and logged-in.

USE CASE 4

Listen for state-change events elsewhere in the app without coupling to the state machine's internals.

What is it built with?

JavaScriptNode.jsEventEmitter

How does it compare?

yyx990803/emitter-fsmboneskull/promwrapbrunosimon/ecole-multimedia-fi-dev2-2019
Stars777
LanguageJavaScriptJavaScriptJavaScript
Last pushed2014-06-102020-07-212021-08-12
MaintenanceDormantDormantDormant
Setup difficultyeasyeasyhard
Complexity2/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

README suggests reading the tests to learn usage, since documentation is minimal.

License is not stated in the available content.

Copy-paste prompts

Prompt 1
Use emitter-fsm to build a state machine for a login flow with logged-out, logging-in, and logged-in states.
Prompt 2
Show me how to define states and allowed transitions with emitter-fsm for a music player with playing, paused, and stopped states.
Prompt 3
Help me listen for state transition events from an emitter-fsm state machine in another part of my app.
Prompt 4
Explain how emitter-fsm uses Node's EventEmitter under the hood to broadcast state changes.

Frequently asked questions

What is emitter-fsm?

A lightweight JavaScript state machine library built on Node's EventEmitter, letting you define states and transitions and get notified when the state changes.

What language is emitter-fsm written in?

Mainly JavaScript. The stack also includes JavaScript, Node.js, EventEmitter.

Is emitter-fsm actively maintained?

Dormant — no commits in 2+ years (last push 2014-06-10).

What license does emitter-fsm use?

License is not stated in the available content.

How hard is emitter-fsm to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is emitter-fsm for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.