parser-aa-vars
v1.0.1
Published
### Install ```bash npm install parser-aa-vars ```
Downloads
3
Readme
parser-aa-vars
Install
npm install parser-aa-vars
Example
const parser = require('parser-aa-vars');
const definition = {
messages: [
{
if: `{trigger.data.d}`,
app: 'data',
payload: `{trigger.data.d}`
},
{
if: `{trigger.data.sub}`,
app: 'data',
payload: {
xx: 66.3,
sub: `{trigger.data.sub}`
}
},
{
if: `{trigger.data.output}`,
app: 'payment',
payload: {
asset: "base",
outputs: [
`{trigger.data.output}`
]
}
},
{
if: `{trigger.data.payment}`,
app: 'payment',
payload: `{trigger.data.payment}`
},
]
};
console.log(parser(definition)); // [ 'd', 'sub', 'output', 'payment' ]