Basics

JS

This filter allows to extend the basic driplane’s filter, defining Javascript scripts. It is based on islazy/plugin which in turn is based on robertkrimen/otto.
Defining a JS file with our custom logic, it is possible create a complex filter.

Parameters

ParameterTypeDefaultDescription
pathSTRINGemptypath of the Javascript file (it can contains multiple functions)
functionSTRINGemptyname of the function in the JS file to call when a Message is received
... | js(path="script.js", function="MyFunction") | ...

Output

The output Message of this filter depends on the return value of the JS function itself.

Examples

What's on this Page