Skip to content

Latest commit

 

History

History
65 lines (48 loc) · 2.37 KB

File metadata and controls

65 lines (48 loc) · 2.37 KB

Fluent State 🔄

GitHub Release Downloads Build status

A fluent JavaScript State Machine with full TypeScript support

Getting Started

Install package

npm i @2toad/fluent-state

Usage

import { fluentState } from '@2toad/fluent-state';
// or
const { fluentState } = require('@2toad/fluent-state');
fluentState
  .from('vegetable').to('diced').or('pickled')
  .from('diced').to('salad').or('trash');

fluentState
  .when('diced').do(() => console.log('diced'));

// Perform transition
await fluentState.transition('diced');
// or
await fluentState.next();

Further Reading

Core Concepts

Key Features

Debugging & Monitoring

Extension

  • Plugins - Extend functionality with plugins
  • Contributing - Guidelines for contributors
  • Roadmap - Upcoming features and improvements

Contributing 🤝

So you want to contribute to the Fluent State project? Fantastic! Please read the Contribute doc to get started.