Repository navigation
feat(csv-stringify): support per-column casting - #572
Open
wozhenbang2004 wants to merge 4 commits into
Open
wozhenbang2004 wants to merge 4 commits into
wozhenbang2004 wants to merge 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #322.
Add an optional
castcallback to object column definitions, so columns with the same data type can use different formats without rewriting the input records.The callback receives the original value and existing casting context. It overrides type-based casting for that column's data; headers and columns without a callback keep their current casts. Return values, field options, quoting and errors use the existing casting path. Includes types, tests and a sample.
On Node 24.22.3, the package tests pass with 255 passing and 1 existing pending when excluding the existing
api.sync.memory.jssample. That sample exceeds the same 512 MB heap on both the original base and this branch. TypeScript, the package build, and changed-file lint/format checks pass. Test sources and CI are unchanged apart from the added feature tests.