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

react-data-viewer

v0.2.0

Published

A small React component to visualise JSON, plain JavaScript objectsor arrays

Readme

React-Data-Viewer

A simple React component to render data structures (objects, arrays or any other) in the browser.

alt text

Usage

via npm:

npm install react-data-viewer --save

Or you can just pull it from github and import it. In case you are not using something like Babel in your project, or you are simply not comfortable yet with ES2015 syntax, there is an ES5 version as well. Just look for the ES5 folder.

Props

data [any type, required] this is the data structure to render, it can be an object, an array, or even a boolean, number or string.

indent [number, optional] this the indentation of the items or attributes rendered. By default is 40 pixels.

expanded [bool, optional] this tells the component if it should be rendered open or closed. By default is open.

className [string, optional] this is an optional class name that you can add to the component.

Tests

very simple test suite with mocha and React shallow rendering. Just run npm test to check it out.

Examples

In the folder examples, you are going to be able to check a couple of very simple ones. Feel free to play around with them to see the possibilities of the components.

To run the examples, from the root of the package:

cd ./examples
npm install
npm start

The examples are built on top of the excellent react-hot-boilerplate, by Dan Abramov.