mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
Major features implemented: - Core TOML stringify functionality with comprehensive error handling - Support for all basic TOML types: strings, numbers, booleans, arrays, tables - Options support: inlineTables, arraysMultiline, indent - Proper string escaping with control character handling - Special float value support (nan, inf, -inf) - Key validation and quoting when necessary - Table and inline table formatting - TypeScript type definitions with comprehensive documentation - Comprehensive test suite covering basic and advanced functionality API Features: - Bun.TOML.stringify(value, replacer?, options?) - Options: inlineTables, arraysMultiline, indent - Error messages for different failure modes - Round-trip compatibility with Bun.TOML.parse() The implementation provides a solid foundation for TOML stringification in Bun, following similar patterns to JSON.stringify and YAML.stringify. Memory management has been carefully handled to prevent use-after-free issues in the JavaScript runtime. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>