Skip to content

Commit

Permalink
Document k6 v0.57.0 csv asObjects option
Browse files Browse the repository at this point in the history
  • Loading branch information
oleiade authored and inancgumus committed Feb 7, 2025
1 parent 0b152f7 commit 5a31987
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions types/k6/experimental/csv/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,22 @@ export interface Options {
* The line number the parsing should stop at. Default is undefined.
*/
toLine?: number;

/**
* AsObjects indicates that the CSV rows should be returned as objects, where
* the keys are the header column names, and values are the corresponding
* row values.
*
* When this option is enabled, the first line of the CSV file is treated as the header.
*
* If the option is set and no header line is present, this should be considered an error
* case.
*
* This option is incompatible with the `skipFirstLine` option, and if both are set, an error
* should be returned. Same thing applies if the `fromLine` option is set to a value greater
* than 0.
*/
asObjects?: boolean;
}

export * as default from "k6/experimental/csv";

0 comments on commit 5a31987

Please sign in to comment.