npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

json2csv-cli

v1.3.2

Published

CLI that transform a JSON to CSV with Key,Value format. Usefull to list all keys from a json object.

Readme

jsonTocsv (j2c)

CLI that transform a JSON to CSV with Key,Value format. Usefull to list all keys from a json object.

A web app also available --> Web App jsonToCsv

Installation

Install CLI :

npm install json2csv-cli -g

Install Api

npm install --save json2csv-cli

Usage CLI

j2c --json [file.json] --csv [file.csv]
Options:

    -V, --version       output the version number
    --json [file.json]  Your entry file, must be a json file.
    --csv [file.csv]    The csv file that will be saved. (If not existing , will create it)
    -f, --first         Specify the name of the object at the first position (default = obj)
    -h, --help          output usage information

Usage Api

The Api is available for Browser and nodejs.

import J2C from "json2csv-cli";

or

const J2C = require("json2csv-cli");
const parsedJson = JSON.parse(jsonUnParsed); // transform the JSON in JS object
const jsonTocsv = new J2C(parsedJson); // Instanciate
jsonTocsv.convert(); // Use convert() method to transform the JS object in csv format.
const csv = jsonTocsv.onceFilled(); // Once the array is filled , use this method to apply correct format.

Output

file.csv :

Key,Values
obj.test.path,value1
obj.other.path.test,value2
obj.again.path,value3

License

MIT