This release implements several changes to the behavior of `CSVNormalizer` to increase its usefulness:
**New `CSVNormalizer.toObject()` static method**: This method is useful when users only need to **read the values of a normalized CSV row**. Previously, users would have to search the row by column name, then get the value of the field. Now, users can simply call `CSVNormalizer.toObject(row)` and destructure the resulting object normally.
**New `CSVNormalizer.toFieldMap()` static method**: This method is useful when users need to **both read and write values of a normalized CSV row**. This method implements a subset of the `Map` interface that keeps the underlying `CSVNormalizerField` objects in sync with changes made on the field values.
**Parse Unix timestamps**: In addition to Excel native date values, the normalizer can now also parse Unix timestamps (both seconds and milliseconds). It uses a simple heuristic with arbitrary cutoffs to pick which one of the three was the most likely intended value.
**Column names are now case-insensitive**: The normalizer is now **case-insensitive** when parsing column names. This change aligns with the overall opinionated nature of the normalizer and is consistent with the already strong opinions about neutralizing whitespace in column names.
**All empty rows before the header are now deleted**: Sometimes users insert empty rows before the data for formatting purposes. These empty rows are now deleted by the normalizer.
**Clarify data casting**: `CSVNormalizer` now emits native data types (e.g., `BigInt` or `Date`) instead of casting to `string`. As a complementary change, `CSVDenormalizer` now always emits `string`. This change aligns these two classes to serve complementary roles (`CSVNormalizer` converts `Array<string>` to `Array<CSVNormalizerField>` and `CSVDenormalizer` converts `Array<CSVNormalizerField>` to `Array<string>`).
-----BEGIN SSH SIGNATURE-----
U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAg4OaSdijsW6raSPK3llrsZIEdtk
SQaGaXESF8DcruCNgAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5
AAAAQC89YJANM5hEyq+DCP2AggMlzbXnIvr1f7byqXHUQPraLqBVuOLHZCoijrqB/k4enk
o9mnNplc7bItDkGlafiQA=
-----END SSH SIGNATURE-----
This page took 0.028557 seconds and 3 git commands to generate.