2020-09-16 15:00:04 +02:00
|
|
|
let filter = require("./steps/filter")
|
|
|
|
let delay = require("./steps/delay")
|
2020-09-10 16:00:21 +02:00
|
|
|
|
2020-09-16 15:00:04 +02:00
|
|
|
let BUILTIN_LOGIC = {
|
|
|
|
DELAY: delay.run,
|
|
|
|
FILTER: filter.run,
|
|
|
|
}
|
2020-09-10 16:00:21 +02:00
|
|
|
|
2020-09-16 15:00:04 +02:00
|
|
|
let BUILTIN_DEFINITIONS = {
|
|
|
|
DELAY: delay.definition,
|
|
|
|
FILTER: filter.definition,
|
2020-09-10 16:00:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports.getLogic = function(logicName) {
|
2020-09-16 15:00:04 +02:00
|
|
|
if (BUILTIN_LOGIC[logicName] != null) {
|
|
|
|
return BUILTIN_LOGIC[logicName]
|
2020-09-10 16:00:21 +02:00
|
|
|
}
|
|
|
|
}
|
2020-09-15 15:27:23 +02:00
|
|
|
|
2020-09-16 15:00:04 +02:00
|
|
|
module.exports.BUILTIN_DEFINITIONS = BUILTIN_DEFINITIONS
|