Treatment process
javascript::process
Configuration
⬡ engine:
javascript::JavaScriptEngine
Parameters
↳ var code:
string = ""
Inputs
⇥ value:
Stream<string>
Outputs
↦ is_valid:
Stream<bool>
↦ result:
Stream<string>
Executes JavaScript code on values.
For every incoming value
, code
is executed as-is within engine
.
Inside the code
part the incoming value is reffered as globally-accessible value
variable.
value
must be valid JSON data, in order to be turned into proper JS object.
code
can return any JS object convertible into JSON data.
If value
is not proper JSON data, code
not actually processable JavaScript code, or its return value not convertible into JSON, an empty result
and is_valid
false
value are send.
In all other cases, result
contains JSON string and is_valid
is true
.