Get the names of the functions provided by this provider. This is used by the function factory to determine which provider can create a function expression for a given function name.
an array of function names provided by this provider.
Create a valid function expression for the given function name and arguments. The function factory will call this method when it needs to create a function expression for a function name that this provider supports.
Ideally, arguments should be checked for validity (e.g., correct number and types) before creating the function expression, and an error should be thrown if the arguments are invalid.
the name of the function to create.
the arguments to pass to the function.
Create a mock function expression for the given function name and arguments. This is used by the autocomplete feature to provide suggestions for function names and arguments. Arguments are not checked for validity.
the name of the function to create a mock for.
the arguments to pass to the mock function.
a mock function expression, or undefined if the function name is not supported.
Convert the function to a JavaScript representation. This can be used to generate JavaScript code from the function expression using dynamic compilation.
the name of the function to convert.
an object containing the argument names and the function body as a string, or undefined if the function name is not supported.
Implement this interface to provide custom functions that can be used in rules. Each provider can supply one or more functions, and the function factory will use these providers to create function expressions when parsing rules. This allows for extensibility and customization of the functions available in the rule engine without modifying the core codebase.