mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 04:49:06 +00:00
Support both JSON.stringify-style and object-style parameters:
JSON.stringify-style:
- Bun.TOML.stringify(obj, null, 2) // number for spaces
- Bun.TOML.stringify(obj, null, '\t') // string for indentation
Object-style (advanced options):
- Bun.TOML.stringify(obj, null, { inlineTables: true })
Updated TypeScript definitions to reflect the enhanced API with
proper union types and comprehensive examples.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>