1.24.1 • Published 1 year ago
@wmfs/asl-choice-processor v1.24.1
asl-choice-processor
For determining the next state given an Amazon States Language "Choices" definition and a set of values.
Useful links
- Amazon States Language specification (Apache License, Version 2.0)
- Choice state documentation
Install
$ npm install asl-choice-processor --save
Usage
const choiceProcessor = require('asl-choice-processor')
const calculateNextState = choiceProcessor(
{
Choices: [
{
Variable: '$.foo',
NumericEquals: 1,
Next: 'FirstMatchState'
},
{
Variable: '$.foo',
NumericEquals: 2,
Next: 'SecondMatchState'
}
],
Default: 'DefaultMatchState'
}
)
calculateNextState( {foo: 1} ) // FirstMatchState
calculateNextState( {foo: 2} ) // SecondMatchState
calculateNextState( {foo: 3} ) // DefaultMatchState
Tests
$ npm test
License
1.24.1
1 year ago
1.23.0
2 years ago
1.24.0
2 years ago
1.21.0
4 years ago
1.22.0
4 years ago
1.20.0
4 years ago
1.19.0
4 years ago
1.18.0
4 years ago
1.17.0
4 years ago
1.16.0
4 years ago
1.15.0
5 years ago
1.14.0
5 years ago
1.13.0
5 years ago
1.12.0
6 years ago
1.11.0
6 years ago
1.10.1
6 years ago
1.10.0
6 years ago
1.9.0
6 years ago
1.8.0
6 years ago
1.7.0
6 years ago
1.6.0
6 years ago
1.5.0
6 years ago
1.4.0
6 years ago
1.3.0
6 years ago
1.2.0
7 years ago
1.1.0
7 years ago
1.0.0
7 years ago