@peacockproject/statemachine-parser v6.2.0
StateMachineParser
Check what an IOI state machine would return given an input.
What's an IOI state machine?
An IOI state machine is what we call a part of the JSON scripting system used within the Glacier engine.
For example:
{
"$eq": ["$Value.MyParameter", "Hello"]
}That is a state machine condition that checks if $Value.MyParameter is "Hello".
Normally, only the actual Glacier engine could check the output of this condition, but this parser can also do it.
How to Use
Install from npm
You can run:
yarn add @peacockproject/statemachine-parserOr, if you use npm:
npm i @peacockproject/statemachine-parserBuild from Source
git clone https://github.com/thepeacockproject/StateMachineParser
cd StateMachineParser
# installs dependencies and builds
yarn && yarn buildUsage
const { test } = require("@peacockproject/statemachine-parser")
const condition = {
$eq: ["$Value.Greeting", "Hi!"],
}
const result = test(
condition, // the state machine condition
{
Value: {
Greeting: "Hi!",
},
} // the variables object, which is essentially the input values.
)1 year ago
1 year ago
1 year ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago