Formatter module provides utilities for serializing data to various output formats. It supports TOON (the default format), JSON, YAML, Markdown tables, and JSONL.
Types
Format
Supported output formats for theformat() function.
TOON format (default) - a concise, human-readable format
Pretty-printed JSON with 2-space indentation
YAML format
Markdown format with tables for structured data
JSON Lines format (one JSON object per line)
Functions
format
Serializes a value to the specified format. Defaults to TOON.The value to serialize. Can be any JavaScript value including objects, arrays, primitives, or null/undefined.
The output format. Defaults to
'toon'.The serialized string representation of the value

