Package doist.ffs.rule

Functions

Link copied to clipboard
fun eval(formula: String, env: JsonObject): Float

Evaluates the given formula resulting in unit interval 0, 1, the frequency of returning true. 0 is always false, 1 is always true, 0.5 is true ~50% of the time, depending on the environment.

Link copied to clipboard
fun isEnabled(formula: String, env: JsonObject, flagId: Any): Boolean

Returns true when the given formula evaluates positively, false when it doesn't.

Link copied to clipboard
fun validateFormula(formula: String): Boolean