]> git.ardis.lu - csvio/log
csvio
20 months agoRefactor createCSVReadableStream to CSVReader
Ardis Lu [Sun, 19 Jan 2025 06:55:36 +0000 (22:55 -0800)]
Refactor createCSVReadableStream to CSVReader

20 months agoPopulate JSDoc descriptions for TransformationFunction
Ardis Lu [Sun, 19 Jan 2025 06:24:33 +0000 (22:24 -0800)]
Populate JSDoc descriptions for TransformationFunction

20 months agoRefactor createCSVTransformStream to CSVTransformer
Ardis Lu [Sun, 19 Jan 2025 06:22:29 +0000 (22:22 -0800)]
Refactor createCSVTransformStream to CSVTransformer

Using classes is more aligned with existing stream APIs such as TextEncoder and CompressionStream.

20 months agoAdd maxBatchSize option
Ardis Lu [Sat, 18 Jan 2025 07:52:29 +0000 (23:52 -0800)]
Add maxBatchSize option

Although this functionality could be implemented by end-users by returning null in the transformation function until a batch is accumulated, baking it into the transform stream simplifies this common use case.

20 months agoSplit out TransformationInput and TransformationOutput types
Ardis Lu [Sat, 18 Jan 2025 07:18:03 +0000 (23:18 -0800)]
Split out TransformationInput and TransformationOutput types

20 months agoSplit out TransformationFunction callback function signature
Ardis Lu [Sat, 18 Jan 2025 07:12:13 +0000 (23:12 -0800)]
Split out TransformationFunction callback function signature

21 months agoAdd onError callback option
Ardis Lu [Wed, 15 Jan 2025 08:28:40 +0000 (00:28 -0800)]
Add onError callback option

21 months agoAlign example to match others
Ardis Lu [Tue, 14 Jan 2025 07:30:12 +0000 (23:30 -0800)]
Align example to match others

21 months agoSimplify and add test cases for parsePathLike
Ardis Lu [Mon, 13 Jan 2025 04:09:40 +0000 (20:09 -0800)]
Simplify and add test cases for parsePathLike

fileURLToPath already throws on unsupported URLs, no need to re-throw.

21 months agoBreak out parsePathLike utility function
Ardis Lu [Sun, 12 Jan 2025 08:11:41 +0000 (00:11 -0800)]
Break out parsePathLike utility function

21 months agoMake file URL parser more robust
Ardis Lu [Sat, 11 Jan 2025 09:33:42 +0000 (01:33 -0800)]
Make file URL parser more robust

21 months agoTweak wording
Ardis Lu [Sat, 11 Jan 2025 04:30:24 +0000 (20:30 -0800)]
Tweak wording

21 months agoUse PascalCase for type names
Ardis Lu [Fri, 10 Jan 2025 07:13:13 +0000 (23:13 -0800)]
Use PascalCase for type names

21 months agoAllow transformation function to return multiple rows
Ardis Lu [Fri, 10 Jan 2025 06:11:13 +0000 (22:11 -0800)]
Allow transformation function to return multiple rows

21 months agoAdd table of contents
Ardis Lu [Fri, 10 Jan 2025 05:54:10 +0000 (21:54 -0800)]
Add table of contents

21 months agoDelete redundant tests
Ardis Lu [Fri, 10 Jan 2025 05:51:38 +0000 (21:51 -0800)]
Delete redundant tests

Use examples.test.js for end-to-end tests instead

21 months agoAdd test suite to test all examples
Ardis Lu [Fri, 10 Jan 2025 05:48:27 +0000 (21:48 -0800)]
Add test suite to test all examples

21 months agoExplicitly await for stream close
Ardis Lu [Fri, 10 Jan 2025 05:45:15 +0000 (21:45 -0800)]
Explicitly await for stream close

Otherwise, a race condition occurs when running these examples in test cases

21 months agoUse paths relative to JS file location, not execution location
Ardis Lu [Thu, 9 Jan 2025 07:29:35 +0000 (23:29 -0800)]
Use paths relative to JS file location, not execution location

Allows the example files to be run from any directory, not just /examples

21 months agoAccept PathLike input for createCSVWritableStream
Ardis Lu [Thu, 9 Jan 2025 07:27:33 +0000 (23:27 -0800)]
Accept PathLike input for createCSVWritableStream

To be consistent with createCSVReadableStream and also allow paths relative to JS file (vs. execution directory only).

21 months agoAdd example for returning null in transformation
Ardis Lu [Thu, 9 Jan 2025 05:44:24 +0000 (21:44 -0800)]
Add example for returning null in transformation

21 months agoAllow transformation function to consume input row without output
Ardis Lu [Thu, 9 Jan 2025 05:38:02 +0000 (21:38 -0800)]
Allow transformation function to consume input row without output

21 months agoSpecify "transformation function" instead of "logic function" to be clear
Ardis Lu [Thu, 9 Jan 2025 05:16:36 +0000 (21:16 -0800)]
Specify "transformation function" instead of "logic function" to be clear

21 months agoPush one empty row if CSV is blank
Ardis Lu [Wed, 8 Jan 2025 06:24:25 +0000 (22:24 -0800)]
Push one empty row if CSV is blank

Added a negative test to catch this edge case because it was not caught with the positive test case.

21 months agoAvoid flushing to disk
Ardis Lu [Sat, 4 Jan 2025 07:22:00 +0000 (23:22 -0800)]
Avoid flushing to disk

Performance cost is too great (for a 100k row/100MB CSV, increases write time from 6s to 60s) for benefit (memory usage, partial recoverability if interrupted). Need to use a more intelligent approach than flushing on every row.

21 months agoFormat to prevent horizontal scroll
Ardis Lu [Fri, 3 Jan 2025 05:42:17 +0000 (21:42 -0800)]
Format to prevent horizontal scroll

21 months agoAdd tests for rawOutput
Ardis Lu [Fri, 3 Jan 2025 04:33:26 +0000 (20:33 -0800)]
Add tests for rawOutput

21 months agoRefactor to delete redundant code
Ardis Lu [Fri, 3 Jan 2025 04:32:41 +0000 (20:32 -0800)]
Refactor to delete redundant code

21 months agoInitial commit
Ardis Lu [Thu, 2 Jan 2025 02:43:28 +0000 (18:43 -0800)]
Initial commit

This page took 0.043507 seconds and 4 git commands to generate.