JSSM, a JavaScript state machine - the FSM for FSL
    Preparing search index...

    Function sm


    • Create a state machine from a template string. This is one of the two main paths for working with JSSM, alongside from.

      Use this method when you want to work directly and conveniently with a constant template expression. Use .from when you want to pull from dynamic strings.

      import * as jssm from 'jssm';

      const lswitch = jssm.from('on <=> off;');

      Type Parameters

      • mDT

        The type of the machine data member; usually omitted

      Parameters

      • template_strings: TemplateStringsArray

        The assembled code

      • ...remainder: any[]

        The mechanic for template argument insertion

      Returns Machine<mDT>