Skip to content

API reference > @kontsedal/olas-devtools > formatPayload

formatPayload() function ​

Render a payload (props, vars, result, etc.) as a single-line string for the panel. Cuts at maxLen so a giant blob doesn't blow up the layout. Never throws: a cycle reads [Circular], and a value that cannot be read at all reads [unserializable].

Signature:

typescript
export declare function formatPayload(value: unknown, maxLen?: number): string;

Parameters ​

Parameter

Type

Description

value

unknown

maxLen

number

(Optional)

Returns:

string

Released under the MIT License.