Skip to content

feat: support null and undefined in stringify cast options#484

Merged
wdavidw merged 4 commits into
adaltas:masterfrom
vishwakt:feature/cast-null-undefined
May 13, 2026
Merged

feat: support null and undefined in stringify cast options#484
wdavidw merged 4 commits into
adaltas:masterfrom
vishwakt:feature/cast-null-undefined

Conversation

@vishwakt
Copy link
Copy Markdown
Contributor

@vishwakt vishwakt commented May 12, 2026

Resolves #440.

I noticed the issue had been open for some time and wanted to help push it forward.

Instead of introducing new root-level options, this PR implements cast.null and cast.undefined. I felt that this approach is more aligned with the project's existing design and allows users to easily emit unquoted null strings (like NULL or \N) by simply returning { value: "NULL", quoted: false }.

Full test coverage is included and added more tests to support the new code.

@wdavidw wdavidw force-pushed the feature/cast-null-undefined branch from 83d301b to 6c51f2b Compare May 13, 2026 09:11
@wdavidw
Copy link
Copy Markdown
Member

wdavidw commented May 13, 2026

@vishwakt thank you

@wdavidw wdavidw merged commit 75ca89b into adaltas:master May 13, 2026
5 checks passed
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.

Provide an easy way to handle null value

2 participants