Module

x/jssm/jssm.js>Machine

Fast, easy Javascript finite state machines with visualizations; enjoy a one liner FSM instead of pages. MIT; Typescripted; 100% test coverage. Implements the FSL language.
Go to Latest
class Machine
import { Machine } from "https://dotland.deno.dev/x/jssm@5.98.0/jssm.js";

Constructors

new
Machine(unnamed 0)

Properties

readonly
active_state_style
readonly
allows_override
readonly
code_allows_override
readonly
config_allows_override
readonly
create_start_time
readonly
creation_date
readonly
creation_timestamp
readonly
end_state_style
readonly
history
readonly
history_inclusive
history_length
readonly
hooked_state_style
rng_seed
readonly
standard_state_style
readonly
start_state_style
readonly
terminal_state_style
themes
readonly
uses_actions
readonly
uses_forced_transitions

Methods

_new_state(state_config)
action(actionName, newData)
actions(whichState?)
do(actionName, newData)
edges_between(from, to)
force_transition(newState, newData)
go(newState, newData)
has_state(whichState)
hook(
from,
to,
handler,
)
hook_action(
from,
to,
action,
handler,
)
hook_entry(to, handler)
hook_exit(from, handler)
hook_global_action(action, handler)
is_end_state(whichState)
is_start_state(whichState)
is_unenterable(whichState)
known_prop(prop_name)
label_for(state)
list_entrances(whichState?)
list_exit_actions(whichState?)
list_exits(whichState?)
list_transitions(whichState?)
override(newState, newData)
post_hook(
from,
to,
handler,
)
post_hook_action(
from,
to,
action,
handler,
)
post_hook_entry(to, handler)
post_hook_exit(from, handler)
post_hook_global_action(action, handler)
probable_exits_for(whichState)
prop(name)
serialize(comment)
set_hook(HookDesc)
set_state_timeout(next_state, after_time)
sm(template_strings, ...remainder)
state_for(whichState)
state_is_complete(whichState)
state_is_final(whichState)
state_is_terminal(whichState)
state_timeout_for(which_state)
style_for(state)
transition(newState, newData)
transition_impl(
newStateOrAction,
newData,
wasForced,
wasAction,
)
valid_action(action, _newData)
valid_force_transition(newState, _newData)
valid_transition(newState, _newData)