
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Stream and CLI to convert CSV to JSON.
Installation of the npm package:
Install globally if you want to use the CLI:
npm install --global csv2json
Install locally if you want to use it as a library:
npm install --save csv2json
Usage: csv2json [OPTIONS] [<input file> [<output file>]]
-d, --dynamic-typing
Convert booleans and numeric to their type instead of strings.
-s <separator>, --separator=<separator>
Field separator to use (default to comma “,”).
-t, --tsv
Use tab as separator, overrides separator flag.
<input file>
CSV file to read data from.
If unspecified or a dash (“-”), use the standard input.
<output file>
JSON file to write data to.
If unspecified or a dash (“-”), use the standard output.
var csv2json = require('csv2json');
var fs = require('fs');
fs.createReadStream('data.csv')
.pipe(csv2json({
// Defaults to comma.
separator: ';'
}))
.pipe(fs.createWriteStream('data.json'));
Contributions are very welcomed, either on the documentation or on the code.
You may:
Thanks to @twilson63 for letting me use the csv2json name on npm.
ISC © Julien Fontanet
FAQs
Stream and CLI to convert CSV to JSON
We found that csv2json demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.