Socket
Socket
Sign inDemoInstall

xstate-plantuml

Package Overview
Dependencies
1
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    xstate-plantuml

Convert a xstate or react-automata statechart to a plantuml state diagram


Version published
Maintainers
1
Created

Readme

Source

xstate-plantuml

Convert a xstate or react-automata statechart to a plantuml state diagram

Usage

import convert from 'xstate-plantuml';

const config = {
  key: 'light',
  initial: 'green',
  states: {
    green: {
      on: {
        TIMER: 'yellow'
      }
    },
    yellow: {
      on: {
        TIMER: 'red'
      }
    },
    red: {
      on: {
        TIMER: 'green'
      }
    }
  }
};

console.log(convert(config));

Supports

  • Single machine
  • Parallel machine
  • Hierarchical machine
  • History machine
  • Initial event
  • Internal string events {on: {x: '.y'}}
  • Internal obj events {on {x: {target: 'y'}}}
  • String event {on: {x: 'y'}}
  • Object event {on: {x: {y: {}}}}
  • Array event {on: {x: [{target: 'y'}]}}
  • String action fetch
  • Object action { type: 'fetch'}
  • Function action
  • onEntry actions
  • onExit actions
  • transition actions

FAQs

Last updated on 25 Aug 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc