Can anyone recommend a NS compatible rules engine they've had success with before I roll my own?
m
Marc Reicher
03/18/2021, 5:58 PM
Curious what you are trying to do exactly @ehcanadian
e
ehcanadian
03/18/2021, 6:02 PM
Load a transaction and perform certain actions on it according to various rules. I don't want numerous if/switch statements. I haven't decided on what design pattern I'd like to use. This (https://github.com/cachecontrol/json-rules-engine) is along the lines of what I'd like to use, but it definitely won't load up in NS as is.
m
Marc Reicher
03/18/2021, 6:17 PM
ah I see. Not sure I have a great recommendation
b
battk
03/18/2021, 7:03 PM
you can try your luck with browserify
battk
03/18/2021, 7:18 PM
actually, taking another look suggests this uses promises and function expressions, which will require at least suitescript 2.1
battk
03/18/2021, 7:19 PM
be extra weary of promises in 2.1, there is no global rejection handler for promises