stringify(obj: Record<string, unknown>,options?: StringifyOptions,): string
Converts an object to a TOML string.
Usage
Usage
import { stringify } from "@std/toml/stringify"; import { assertEquals } from "@std/assert"; const obj = { title: "TOML Example", owner: { name: "Bob", bio: "Bob is a cool guy", } }; const tomlString = stringify(obj); assertEquals(tomlString, `title = "TOML Example"\n\n[owner]\nname = "Bob"\nbio = "Bob is a cool guy"\n`);
obj: Record<string, unknown>
Source object
optional
options: StringifyOptions
Options for stringifying.
TOML string