Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mrodrig/json-2-csv-cli

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mrodrig/json-2-csv-cli

CLI for the json-2-csv package

  • 4.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3K
increased by5.97%
Maintainers
1
Weekly downloads
 
Created
Source

json-2-csv-cli

Convert JSON to CSV or CSV to JSON

This module provides the command line interface functionality for the json-2-csv package.

Dependencies Downloads NPM version Known Vulnerabilities

Installation

CLI:

$ npm install -g @mrodrig/json-2-csv-cli

Usage

json2csv

Usage: json2csv <jsonFile> [options]

Options:
  -V, --version                    output the version number
  -o, --output [output]            Path of output file. If not provided, then stdout will be used
  -f, --field <delimiter>          Optional field delimiter
  -w, --wrap <delimiter>           Optional wrap delimiter
  -e, --eol <delimiter>            Optional end of line delimiter
  -b, --excel-bom                  Excel Byte Order Mark character prepended to CSV
  -W, --without-header             Withhold the prepended header
  -s, --sort-header                Sort the header fields
  -H, --trim-header                Trim header fields
  -F, --trim-fields                Trim field values
  -S, --check-schema               Check for schema differences
  -E, --empty-field-value <value>  Empty field value
  -A, --expand-array-objects       Expand array objects
  -U, --unwind-arrays              Unwind array values to their own CSV line
  -k, --keys [keys]                Keys of documents to convert to CSV
  -h, --help                       output usage information

csv2json

Usage: csv2json <csvFile> [options]

Options:
  -V, --version            output the version number
  -o, --output [output]    Path of output file. If not provided, then stdout will be used
  -f, --field <delimiter>  Optional field delimiter
  -w, --wrap <delimiter>   Optional wrap delimiter
  -e, --eol <delimiter>    Optional end of line delimiter
  -b, --excel-bom          Excel Byte Order Mark character prepended to CSV
  -H, --trim-header        Trim header fields
  -F, --trim-fields        Trim field values
  -k, --keys [keys]        Keys of documents to convert to CSV
  -h, --help               output usage information

Memory

To increase the allowed heap size, set max_old_space_size in NODE_OPTIONS.

Linux/macOs:

export NODE_OPTIONS=--max_old_space_size=4096

Windows:

set NODE_OPTIONS=--max_old_space_size=4096

Keywords

FAQs

Package last updated on 10 Oct 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc