mirror of
https://github.com/jwetzell/showbridge-docs.git
synced 2026-08-11 16:43:38 +00:00
work on auto-generating parts of docs from JSONSchema
This commit is contained in:
@@ -4,6 +4,7 @@ sidebar:
|
||||
label: JavaScript
|
||||
order: 1
|
||||
---
|
||||
import SchemaInfo from '../../../../components/SchemaInfo.astro';
|
||||
|
||||
The `script.js` processor takes in any payload type and executes a JavaScript function that is able to process the payload. The end value of `payload` will be returned as the output of the processor.
|
||||
|
||||
@@ -11,9 +12,7 @@ Ending with a `payload` value of `undefined` is treated the same as any other pr
|
||||
|
||||
This run your JavaScript program in a [sandboxed environment](https://gitlab.com/cznic/quickjs). It currently support the [ES2023](https://tc39.es/ecma262/2023/) specification.
|
||||
|
||||
- **type**: `script.js`
|
||||
- **params**:
|
||||
- **program**: The JavaScript program to run. The payload is available as a global variable called `payload`.
|
||||
<SchemaInfo type="processor" id="script.js"/>
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
Reference in New Issue
Block a user