Logic Code Generator
LOC Logic helper tool for JavaScript/TypeScript logic targeting SDK for JS/TS 0.10.0
.
About This Tool & Disclaimer
This tool runs with a mocked logic runtimewhich may behave differently as in LOC. This is also completely browser-based and will not collect any information you've generated. Any changes will be lost upon refreshing the page.
For the native logic testing feature in Studio, see here.
➀ Select Type and Language ⓘSelect a new type/language will reset blocks and code.
Logic type
Generic
Language
JavaScript
➁ Set Code Blocks ⓘA block is a template snippet to be part of the logic. Modifying blocks will re-sync templates to the logic.
✚: Add a block
🖉: Edit a block
✔: Finish editing a block
🗑: Delete a block
✚: Add a block
🖉: Edit a block
✔: Finish editing a block
🗑: Delete a block
Block comments
➂ Preview and Edit Logic Synced to blocks ⇔ ⓘIndicates if the editor code is completely generated from blocks of the user has edited the code directly
Full import Strict IntelliSense ⓘEnables a series of strict options in the editor.
Errors or warnings shown in strict IntelliSense mode do not affect code execution.
Errors or warnings shown in strict IntelliSense mode do not affect code execution.
Generic
Synced to blocks ⇔
Loading...
④ Logic Unit Test
Verbose logging ⓘEnable detailed logging from agents. This is implemented in mocked runtime for debugging purpose is not the standard feature of LOC runtime or LOC SDKs.
You can also use console.log() or alert() to print custom logs.
You can also use console.log() or alert() to print custom logs.
Setup mock input data ⓘAll mocked data will be bundled in order to simulate accessible data in this logic.
Trigger type
API Route (HttpPayload)
QueryString (
payload.http.request.query
)Request body (
payload.http.request.data
) ⓘBody will be passed as an encoded string regardless of the format (no validation); content type header will be set accordinglyJSON (application/json)
Loading...