1.0.5 • Published 1 year ago

step-function v1.0.5

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
1 year 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

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago