Skip to content

Conversation

@heysebitas
Copy link

Summary

This PR adds a new quoteStrings option to the encoder, allowing users to force wrapping all string values in quotes during formatting.

Context

Some users need strict quoting behavior for string output — especially when working with data pipelines, structured logs, or formats that must always explicitly represent strings.

Issue reference: #102

What’s included

  • Adds a new quoteStrings?: boolean option to the encoder config.
  • When enabled, all string values are forced to be quoted, regardless of content.
  • Updates TypeScript types and propagates the option through the encoding pipeline.
  • Adds tests to cover both default and quoteStrings: true scenarios.

Example

encode({ value: "hello" }, { quoteStrings: true })
// → value: "hello"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant