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 🙏

© 2025 – Pkg Stats / Ryan Hefner

inspectorslack

v0.0.2

Published

Dumb tool to iterate over large JSON object collection and tell about its most interesting characteristics

Readme

inspectorSLACK

Dumb tool to iterate over large JSON object collection and tell about its most interesting characteristics.

Syntax

inspect(iterableObject [, pickAddresses [, maxVals])

Parameters:

  • iterableObject: Iterable object to analyze.

  • pickAddresses: Array of paths (beginning label of each output item) to pick ALL distinct values.

  • maxVals: All paths having less distinct values will display them automatically. (Default 5)

Return value:

Array of strings with some useful information about its contents:

  • Self-explanatory "full" address.
  • Guessed types.
    • Arrays and Objects are displayed in UPPERCASE because they can contain nested data.
    • Array + another type means that it can be an Array or a single item but info is always about items.

Usage example:

Install from npm: npm install inspectorslack

var inspect = require("inspectorslack");

var data = [ // Thanks to https://adobe.github.io/Spry/samples/data_region/JSONDataSetSample.html
    {
        "id": "0001",
        "type": "donut",
        "name": "Cake",
        "ppu": 0.55,
        "batters":
            {
                "batter":
                    [
                        { "id": "1001", "type": "Regular" },
                        { "id": "1002", "type": "Chocolate" },
                        { "id": "1003", "type": "Blueberry" },
                        { "id": "1004", "type": "Devil's Food" }
                    ]
            },
        "topping":
            [
                { "id": "5001", "type": "None" },
                { "id": "5002", "type": "Glazed" },
                { "id": "5005", "type": "Sugar" },
                { "id": "5007", "type": "Powdered Sugar" },
                { "id": "5006", "type": "Chocolate with Sprinkles" },
                { "id": "5003", "type": "Chocolate" },
                { "id": "5004", "type": "Maple" }
            ]
    },
    {
        "id": "0002",
        "type": "donut",
        "name": "Raised",
        "ppu": 0.55,
        "batters":
            {
                "batter":
                    [
                        { "id": "1001", "type": "Regular" },
                        { "id": "1002", "type": "Chocolate" }
                    ]
            },
        "topping":
            [
                { "id": "5001", "type": "None" },
                { "id": "5012", "type": "Glazed+" },
                { "id": "5015", "type": "Sugar+" },
                { "id": "5013", "type": "Chocolate+" },
                { "id": "5014", "type": "Maple+" }
            ]
    },
    {
        "id": "0003",
        "type": "donut",
        "name": "Old Fashioned",
        "ppu": 0.55,
        "batters":
            {
                "batter": { "id": "1001", "type": "Regular" }
                // Notice is NOT an array (typical in conversions from fucking XML)
            },
        "topping":
            [
                { "id": "5001", "type": "None" },
                { "id": "5002", "type": "Glazed" },
                { "id": "5003", "type": "Chocolate" },
                { "id": "5004", "type": "Maple" }
            ]
    }
];

console.log(inspect(data, [
    "topping.type", // Make all distinct values to be displayed.
    /// ...
]).join("\n"));

Output:

id: number - 3 (100%) VALUES: [0001, 0002, 0003]
type: string - 3 (100%) VALUES: [donut]
name: string - 3 (100%) VALUES: [Cake, Raised, Old Fashioned]
ppu: number - 3 (100%) VALUES: [0.55]
batters: OBJECT - 3 (100%)
  batters.batter: ARRAY, OBJECT - 7 (233.33%)
    batters.batter.id: number - 7 (100%) VALUES: [1001, 1002, 1003, 1004]
    batters.batter.type: string - 7 (100%) VALUES: [Regular, Chocolate, Blueberry, Devil's Food]
topping: ARRAY - 16 (533.33%)
  topping.id: number - 16 (100%)
  topping.type: string - 16 (100%) DATA: [None, Glazed, Sugar, Powdered Sugar, Chocolate with Sprinkles, Chocolate, Maple, Glazed+, Sugar+, Chocolate+, Maple+]

Contributing

If you are interested in contributing with this project, you can do it in many ways:

  • Creating and/or mantainig documentation.

  • Implementing new features or improving code implementation.

  • Reporting bugs and/or fixing it.

  • Sending me any other feedback.

  • Whatever you like...

Please, contact-me, open issues or send pull-requests thought this project GIT repository