feat: buildCondition
This commit is contained in:
parent
ce6d2a69ee
commit
39bd4f472a
|
@ -34,3 +34,13 @@ export function buildValue(value) {
|
|||
value,
|
||||
};
|
||||
}
|
||||
|
||||
export function buildCondition(operator, operands) {
|
||||
return {
|
||||
type: 'condition',
|
||||
operator,
|
||||
operands: operands.map((operand) => {
|
||||
return buildValue(operand);
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,4 +8,9 @@ export {
|
|||
fromJSON as behaviorItemFromJSON,
|
||||
register as registerBehaviorItem
|
||||
} from './item/registry';
|
||||
export {buildInvoke, buildTraversal} from './builders';
|
||||
export {
|
||||
buildCondition,
|
||||
buildInvoke,
|
||||
buildTraversal,
|
||||
buildValue,
|
||||
} from './builders';
|
Loading…
Reference in New Issue
Block a user