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

apivis

v6.4.2

Published

JavaScript objects API visualization

Readme

ApiVis

JavaScript objects API visualization

Screenshot

Demo

Distribution

Unpkg - https://unpkg.com/apivis@latest/dist/

Install

Node

npm install apivis

All distribution files are in node_modules/apivis/dist/

Browser

<script src="https://unpkg.com/apivis@latest/dist/apivis.browser.js"></script>

Use

Node

const apivis = require('apivis');
  const {apiStr} = apivis;

console.log(apiStr(process));

Browser

const {apiStr} = apivis;

document.addEventListener('DOMContentLoaded', () => {
  console.log(apiStr(document));
});

ES module

import apivis, {apiStr} from 'apivis/dist/apivis.universal'; // Node
import apivis, {apiStr} from 'apivis'; // Bundlers

// Use the imports

API

The following properties/functions are available through the apivis namespace object returned from require('apivis') on node or available as window.apivis in the browser (the ES module has the namespace object as default export and all the functions as named exports):

  • version - library version
  • typeStr(val) - returns type string for val (based on Object.prototype.toString.call(val) with a few twists)
  • descStr(val, k) - returns own property descriptor string for k in val in the form vw ec or g c for example, where each letter shows if the prop is value and writable or getter and setter and if it is enumerable and configurable
  • memberStr(val, k) - returns string representation for k in val like the one used by membersStr but for a single member
  • members(val) - returns (sorted) array of all own val property names (including symbols)
  • membersStr(val, indent = ' ', level = 0) - returns string representation of all own val property names (including symbols) with type and own property descriptor information and the values of the primitive booleans, numbers and strings, separated by a newline and indented accordingly
  • inspectStr(val, indent = ' ') - returns string representation of val property tree similar to JSON.stringify but much more thorough (includes symbol and string keys and all values, handles circular refs, displays the path of keys to reach to already encountered ref)
  • inspectHtml(val, indent = ' ') - inspectStr variant returning collapsible/expandable DOM representation
  • chain(val) - returns the prototype chain of val (an array, val is first, the root is last)
  • chainStr(val, indent = ' ') - returns string representation of val prototype chain
  • apiStr(val, indent = ' ') - returns string representation of val API tree
  • apiHtml(val, indent = ' ') - apiStr variant returning collapsible/expandable DOM representation
  • domHtml(val, indent = ' ') - peek42.p.domStr variant returning collapsible/expandable DOM representation

See the example folder for node and browser examples respectively