Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
extremeheat committed Aug 20, 2023
1 parent 0a73f5b commit 074599a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ dumbcsv

## API

### fromCSV({ data, file, separator = ',', headerFields, overrideExistingHeader }) : { toJSON: () => object, toMarkdown: () => string }
Input object :
### fromCSV(options: { data, file, separator = ',', headerFields, overrideExistingHeader }) : { toJSON: () => object, toMarkdown: () => string }
Input `options` object:
* `data` (string) -- a string representing the CSV data
* OR `file` (string) -- a path to the CSV
* `headerFields` (optional string[]) -- an array of strings containing the headers for the CSV, assuming they are not the 1st line
Expand Down
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module "dumb-csv" {
// Input object :
// Input `options` object :
// * `data` (string) -- a string representing the CSV data
// * OR `file` (string) -- a path to the CSV
// * `headerFields` (optional string[]) -- an array of strings containing the headers for the CSV, assuming they are not the 1st line
Expand All @@ -8,5 +8,5 @@ module "dumb-csv" {
// Output object :
// * `toJSON()` (function) -- calling this will return a javascript object that represents the CSV
// * `toMarkdown()` (function) -- calling this will return a string that has a formatted markdown table inside that represents the CSV
function fromCSV(data: string?, file?: string, separator = ',', headerFields?: string[], overrideExistingHeader?: boolean) : { toJSON: () => object, toMarkdown: () => string }
function fromCSV(options: { data: string?, file?: string, separator: string, headerFields?: string[], overrideExistingHeader?: boolean }) : { toJSON: () => object, toMarkdown: () => string }
}

0 comments on commit 074599a

Please sign in to comment.