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

jsontocsv

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsontocsv

Convert lines of JSON data to CSV

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Node.js - jsontocsv

Convert lines of JSON data to CSV.

Why?

It's very convenient to write Node.js scripts that dump out a serialized object to a line. Most text processing utilities though cannot handle data like this. However, many can handle CSV files.

Installation

npm install jsontocsv

Programmatically

var jsontocsv = require('jsontocsv')

jsontocsv(inputStream, outputStream, {header: false, whitelist: whitelistFields, separator: ','}, function (err) {
  if (!err) console.log('Success.')
});

The separator is ',' as default.

Command Line

  Usage: jsontocsv [options]

  Options:

    -h, --help                 output usage information
    -V, --version              output the version number
    -b, --blacklist [fields]   Prevent blacklisted fields from output, otherwise all will be used.
    -w, --whitelist [fields]   Only allow whitelisted fields in output, otherwise all will be used.
    -i, --input [file]         Input file. Otherwise STDIN.
    -o, --output [file]        Output file. Otherwise STDOUT.
    -h, --header [true/false]  If set to the true, the CSV header will be output. Defaults to true.

Hacking on jsontocsv

js-standard-style

Alternatives Node.js Packages:

License

(MIT License)

Copyright 2013, JP Richardson jprichardson@gmail.com

Keywords

FAQs

Package last updated on 06 Jan 2016

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