Prettyprinter
Pretty printer engine for MoonBit
Install / Use
/learn @moonbit-community/PrettyprinterREADME
pretty printer
A declarative-style pretty printer engine, which includes printers for built-in
types such as Array, Map, and Json.
Usage
Print Value
Use render to pretty print any type implemented Pretty trait.
let map = {
"name": ["John", "Mike"], "age": ["15","18"], "id": ["11109121","2000012312"]
}
map |> @prettyprinter.render() |> println()
output:
{
"name": ["John", "Mike"],
"age": ["15", "18"],
"id": ["11109121", "2000012312"]
}
Implement Pretty Trait
Write declarative code to implement a printer for your type.
See example in package prettyprinter/example.
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
