Skip to content

Commit

Permalink
code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pstaender committed Apr 22, 2024
1 parent d458064 commit 1ce6895
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .prettierrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion bin/csv2md
@@ -1,2 +1,2 @@
#!/usr/bin/env node
require('../src/cli')
require("../src/cli");
9 changes: 3 additions & 6 deletions src/cli.ts
Expand Up @@ -16,10 +16,7 @@ Usage: $0 [options] <csvfile>`
`Converts csv to pretty markdown table`
)
.example(`cat data.csv | $0 > output.md`, `Converts larger data`)
.example(
`$0 -d=";" < ~/data.csv`,
`Using another csv delimiter than ,`
)
.example(`$0 -d=";" < ~/data.csv`, `Using another csv delimiter than ,`)
.describe(
"pretty",
"pretty output, i.e. optimized column width and not inline-style"
Expand Down Expand Up @@ -73,7 +70,7 @@ const options: Options = {
csvComment: argv.csvComment as string,
csvDelimiter: argv.csvDelimiter as string,
csvQuote: argv.csvQuote as string,
csvEscape: argv.csvEscape as string,
csvEscape: argv.csvEscape as string
};

const csv2md = new Csv2md(options);
Expand All @@ -85,7 +82,7 @@ const parser = parse({
comment: options.csvComment as string,
delimiter: options.csvDelimiter,
quote: options.csvQuote,
escape: options.csvEscape,
escape: options.csvEscape
});

if (processAsStream) {
Expand Down
2 changes: 1 addition & 1 deletion src/csv2md.ts
Expand Up @@ -201,7 +201,7 @@ export class Csv2md implements Options {
comment: this.csvComment,
delimiter: this.csvDelimiter,
quote: this.csvQuote,
escape: this.csvEscape,
escape: this.csvEscape
});
return this.rowsToString(data);
}
Expand Down
4 changes: 2 additions & 2 deletions test/test.ts
Expand Up @@ -8,7 +8,7 @@ const csvOptions = {
comment: "#",
delimiter: undefined,
quote: undefined,
escape: undefined,
escape: undefined
};

const options = {
Expand All @@ -19,7 +19,7 @@ const options = {
cellPadding: " ",
delimiterOnBegin: "|",
delimiterOnEnd: "|",
csvComment: "#",
csvComment: "#"
};

const csvString = require("fs")
Expand Down

0 comments on commit 1ce6895

Please sign in to comment.