You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an optional callback function to the ColumnOptions object that can be used to perform custom formatting or additional processing of a specific columns.
Motivation
Of of the box csv-stringify only supports formatting by data type. This does not allow different formats for different types of columns. For example a column that contain dates as opposed to a column that is a date-time. The same situation occurs when you have a output that requires both numbers and currencies.
Alternative
I am currently constructing an array of functions that are applied in a ForEach() to the rows of the original input.
Summary
Add an optional callback function to the ColumnOptions object that can be used to perform custom formatting or additional processing of a specific columns.
Motivation
Of of the box csv-stringify only supports formatting by data type. This does not allow different formats for different types of columns. For example a column that contain dates as opposed to a column that is a date-time. The same situation occurs when you have a output that requires both numbers and currencies.
Alternative
I am currently constructing an array of functions that are applied in a ForEach() to the rows of the original input.
A working Sample is here:
https://stackblitz.com/edit/typescript-column-format-ks3cs3?file=report-utils/csv-utils.ts
Draft
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: