def

func:evalToFunc

evalToFunc(expr)

Evalate an Axon string expression to a function. Typically the expression is just a function name, but it can be any expression that evaluates to a function. Raise an exception if the expression does not evaluate to a function. Note this call does evalute the given expression in the runtime, so it must be used with caution - never use it with a string from a non-trusted origin.

Examples:

evalToFunc("now").call
evalToFunc("(x, y)=>x+y").call([3, 4])
(evalToFunc("(x, y)=>x+y"))(3, 4)
evalToFunc("""replace(_, "x", "_")""").call(["xyz"])

meta

supertypes

feature

Feature namespace of definitions formatted as feature:name

    func

Axon function