]> git.ardis.lu - csvio/commitdiff
Set default `name` property
authorArdis Lu <ardisglu@gmail.com>
Mon, 6 Oct 2025 05:19:46 +0000 (22:19 -0700)
committerArdis Lu <ardisglu@gmail.com>
Mon, 6 Oct 2025 05:19:46 +0000 (22:19 -0700)
This change makes the typing easier to follow.

src/core.js

index 9eec4219796db6d2f2e21c5c8adadaba77abbc0c..ef97463a3a2f92c9eec327ba30a184d219dc4202 100644 (file)
@@ -472,6 +472,7 @@ export class CSVWriter {
    */
   constructor(path = null) {
     const status = {
+      name: null,
       start: performance.now(),
       elapsed: 0,
       rows: 0,
@@ -481,7 +482,6 @@ export class CSVWriter {
     /** @type {WritableStream<any>|TransformStream<Array<string>,string>} */
     let stream;
     if (path === null) {
-      status.name = null;
       stream = new TransformStream({
         transform(chunk, controller) {
           let data;
This page took 0.038497 seconds and 4 git commands to generate.