Gathering detailed insights and metrics for csv2md
Gathering detailed insights and metrics for csv2md
Gathering detailed insights and metrics for csv2md
Gathering detailed insights and metrics for csv2md
npm install csv2md
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
73 Stars
45 Commits
15 Forks
4 Watching
4 Branches
2 Contributors
Updated on 26 Aug 2024
TypeScript (97.65%)
JavaScript (2.35%)
Cumulative downloads
Total Downloads
Last day
0%
138
Compared to previous day
Last week
-9.5%
723
Compared to previous week
Last month
-2.4%
3,436
Compared to previous month
Last year
20.6%
47,569
Compared to previous year
Install with:
1 $ npm install -g csv2md
Small tool to convert (larger) csv to markdown tables. Processes stdin
or csv file.
1 $ csv2md data.csv > data.md
Piping data is possible (and recommend for larger files):
1 $ csv2md < data.csv 2 3 max_i | min_i | max_f | min_f 4 ---|---|---|--- 5 -122.1430195 | -122.1430195 | -122.415278 | 37.778643 6 -122.1430195 | -122.1430195 | -122.40815 | 37.785034 7 -122.4194155 | -122.4194155 | -122.4330827 | 37.7851673
To write the resulting markdown to a file, use the familiar stream syntax:
1 $ csv2md < data.csv > data.md
The pretty
/ p
option will pad cells to uniform width and uses beginning and ending |
-delimiters by default:
1 $ csv2md -p < data.csv 2 3 | max_i | min_i | max_f | min_f | 4 |--------------|--------------|--------------|------------| 5 | -122.1430195 | -122.1430195 | -122.415278 | 37.778643 | 6 | -122.1430195 | -122.1430195 | -122.40815 | 37.785034 | 7 | -122.4194155 | -122.4194155 | -122.4330827 | 37.7851673 |
It's much more human readable than the default inline-style but will disable stream processing.
Use -h
for more command options:
1 $ csv2md -h
1import { Csv2md } from 'csv2md'
2
3let csvString = fs.readFileSync(__dirname + '/data.csv').toString()
4
5let csv2md = new Csv2md({
6 pretty: true
7})
8
9let markdown = await csv2md.convert(csvString)
1import { Csv2md, csv2md } from 'csv2md' 2 3let csvString = ` 4a,b,c_1,c_2 5-122.1430195,124.3,true,false 6null, a ,a very long string,~ 7a,b,c_1,c_2`.trim() 8 9let markdown = csv2md(csvString, { 10 pretty: true 11})
1import { Csv2md } from 'csv2md' 2import * as transform from 'stream-transform' 3 4const transformer = transform((record, cb) => 5 csv2md.transform(record, cb) 6) 7process.stdin 8 .pipe(parser) 9 .pipe(transformer) 10 .pipe(process.stdout) 11}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
Found 1/16 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More