1.0.5 • Published 3 years ago

step-function v1.0.5

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
3 years ago

Usage example

import { Machine } from "./Machine"
import { State } from "./State"

const goodbyeStep = State.create<string, void>({
    name: "Goodbye",
    resource: (name) => {
        console.log(`Goodbye ${name}`)
    }
})

const helloStep = State.create<string, string>({
    name: "Hello",
    resource: (name) => {
        console.log(`Hello ${name}`)
        return name
    },
    next: goodbyeStep.name
})

const machine = Machine.create({
    description: "Hello Machine",
    startAt: helloStep.name,
    states: [helloStep, goodbyeStep]
})

const response = machine.run('MininoxD')

response.then((result) => {
    console.log(result)
})
1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago