ObsidianTransport.evaluate method
ObsidianTransport › evaluate
Evaluates a JavaScript expression string inside Obsidian and returns the raw string result.The transport normalizes the output — stripping transport-specific prefixes and handling transport-specific errors — so callers receive a clean result string (e.g. a JSON string, or
(no output)).Signature:
evaluate(expression: string, options: TransportEvalOptions): Promise<string>Parameters:
| Parameter | Type | Description |
|---|---|---|
| expression | string | A self-contained JavaScript expression (typically an async IIFE). |
| options | TransportEvalOptions | Evaluation options including the working directory. |
Returns: Promise<string> — The raw result string from Obsidian.